diff --git a/daemon/Dockerfile b/daemon/Dockerfile index 7631807..0abe89f 100644 --- a/daemon/Dockerfile +++ b/daemon/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.5 +FROM python:3.5-slim-stretch # ------------------------------------------- # Daemon APT Install @@ -11,7 +11,16 @@ ARG REMOTE_INIT_PWD=C1i3ntRmSid3 RUN sed --in-place 's!$! non-free!' /etc/apt/sources.list # add non-free repositories from snmp-mibs-downloader -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - +ENV BUILD_DEPENDENCIES apt-utils \ + libc-dev \ + gcc \ + gnupg2 +RUN apt-get update \ + && apt-get install --yes --no-install-recommends \ + $BUILD_DEPENDENCIES \ + curl \ + && curl -sL https://deb.nodesource.com/setup_10.x | bash - \ + && rm --recursive --force /var/lib/apt/lists/* RUN apt-get update \ && apt-get install --yes --no-install-recommends --no-install-suggests \ autossh \ @@ -130,4 +139,5 @@ COPY ./test /test COPY config/ /etc/supervisor/conf.d COPY help-me.mk / +RUN apt-get purge --yes --auto-remove $BUILD_DEPENDENCIES CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/prod.conf"] diff --git a/deploy/release.sh b/deploy/release.sh index 32b1450..15a68e8 100755 --- a/deploy/release.sh +++ b/deploy/release.sh @@ -70,8 +70,10 @@ function build_and_push() { tag_images docker_images[@] "$tag" push_images docker_images[@] "$tag" - tag_images docker_images[@] "latest" - push_images docker_images[@] "latest" + if [[ $tag =~ ^v[0-9].* ]]; then # only releases with version number update latest, not a testing branch + tag_images docker_images[@] "latest" + push_images docker_images[@] "latest" + fi } usage diff --git a/makefile b/makefile index 6a6b335..e7e6737 100644 --- a/makefile +++ b/makefile @@ -51,7 +51,7 @@ tag-as-patch: release: cd deploy/ \ - && ./release.sh "$$(git describe --abbrev=0 --tags)" + && ./release.sh "$$(git describe --tags $$(git rev-list --tags --max-count=1))" prepare-env: docker-compose build # create the containers images