Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Shrink docker image #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions daemon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.5
FROM python:3.5-slim-stretch

# -------------------------------------------
# Daemon APT Install
Expand All @@ -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 \
Expand Down Expand Up @@ -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"]
6 changes: 4 additions & 2 deletions deploy/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down