From 52158ed0fea0c03db02214a23f4c6fc2d9eeb5e1 Mon Sep 17 00:00:00 2001 From: Denis Zheleztsov Date: Thu, 10 Nov 2016 13:24:36 +0300 Subject: [PATCH] Small fix in build script --- build/build.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/build/build.sh b/build/build.sh index fd236ed..42a29d1 100755 --- a/build/build.sh +++ b/build/build.sh @@ -30,12 +30,15 @@ MAINTAINER Denis Zheleztsov COPY surok /opt/surok_build # 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 && \ mv /opt/surok_*.deb /opt/out EOF } + function build_package() { # run build echo 'Build builder' @@ -57,6 +60,8 @@ MAINTAINER Denis Zheleztsov ADD out/${DEB} /tmp RUN apt-get update && apt-get install -y ${SUROK_DEPS} 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 EOF @@ -67,17 +72,12 @@ function usage() { echo "$0 " } -case $1 in clean) - cleanup - ;; - build_package) - build_builder - build_package - ;; - surok_image) - build_surok_base - ;; - *) - usage - ;; +case $1 in + clean) cleanup ;; + build_package) + build_builder + build_package + ;; + surok_image) build_surok_base ;; + *) usage ;; esac