Small fix in build script

This commit is contained in:
Denis Zheleztsov 2016-11-10 13:24:36 +03:00
parent e7f9037976
commit 52158ed0fe

View File

@ -30,12 +30,15 @@ MAINTAINER Denis Zheleztsov <difrex.punk@gmail.com>
COPY surok /opt/surok_build COPY surok /opt/surok_build
# Install build depends # Install build depends
RUN apt-get update && apt-get -y install devscripts debhelper RUN apt-get update
RUN apt-get -y install devscripts debhelper
RUN apt-get clean
ENTRYPOINT cd /opt/surok_build && dpkg-buildpackage -uc -us && \ ENTRYPOINT cd /opt/surok_build && dpkg-buildpackage -uc -us && \
mv /opt/surok_*.deb /opt/out mv /opt/surok_*.deb /opt/out
EOF EOF
} }
function build_package() { function build_package() {
# run build # run build
echo 'Build builder' echo 'Build builder'
@ -57,6 +60,8 @@ MAINTAINER Denis Zheleztsov <difrex.punk@gmail.com>
ADD out/${DEB} /tmp ADD out/${DEB} /tmp
RUN apt-get update && apt-get install -y ${SUROK_DEPS} RUN apt-get update && apt-get install -y ${SUROK_DEPS}
RUN dpkg -i /tmp/${DEB} RUN dpkg -i /tmp/${DEB}
RUN apt-get clean
RUN rm -rf /tmp/*
ENTRYPOINT cd /opt/surok && python3 surok.py -c /etc/surok/conf/surok.json ENTRYPOINT cd /opt/surok && python3 surok.py -c /etc/surok/conf/surok.json
EOF EOF
@ -67,17 +72,12 @@ function usage() {
echo "$0 <clean|build_package|surok_image>" echo "$0 <clean|build_package|surok_image>"
} }
case $1 in clean) case $1 in
cleanup clean) cleanup ;;
;;
build_package) build_package)
build_builder build_builder
build_package build_package
;; ;;
surok_image) surok_image) build_surok_base ;;
build_surok_base *) usage ;;
;;
*)
usage
;;
esac esac