diff --git a/.travis.yml b/.travis.yml index 0a26c190..5905eee0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ addons: env: - MAILU_VERSION=${TRAVIS_BRANCH////-} + - ALPINE_VERSION=3.10 language: python python: @@ -26,7 +27,7 @@ install: before_script: - docker-compose -v - - docker-compose -f tests/build.yml build + - docker-compose -f tests/build.yml build --build-arg ALPINE_VERSION=${ALPINE_VERSION} - sudo -- sh -c 'mkdir -p /mailu && cp -r tests/certs /mailu && chmod 600 /mailu/certs/*' diff --git a/core/admin/Dockerfile b/core/admin/Dockerfile index 22bd4466..7252aeb0 100644 --- a/core/admin/Dockerfile +++ b/core/admin/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG ALPINE_VERSION +FROM alpine:$ALPINE_VERSION # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ diff --git a/core/dovecot/Dockerfile b/core/dovecot/Dockerfile index a4a4c3a3..f36d1951 100644 --- a/core/dovecot/Dockerfile +++ b/core/dovecot/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG ALPINE_VERSION +FROM alpine:$ALPINE_VERSION # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ diff --git a/core/nginx/Dockerfile b/core/nginx/Dockerfile index 1630d58a..3c6115ce 100644 --- a/core/nginx/Dockerfile +++ b/core/nginx/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG ALPINE_VERSION +FROM alpine:$ALPINE_VERSION # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ diff --git a/core/none/Dockerfile b/core/none/Dockerfile index 96bf8411..b383115a 100644 --- a/core/none/Dockerfile +++ b/core/none/Dockerfile @@ -1,5 +1,6 @@ # This is an idle image to dynamically replace any component if disabled. -FROM alpine:3.10 +ARG ALPINE_VERSION +FROM alpine:$ALPINE_VERSION CMD sleep 1000000d diff --git a/core/postfix/Dockerfile b/core/postfix/Dockerfile index c298efa2..dfedb818 100644 --- a/core/postfix/Dockerfile +++ b/core/postfix/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG ALPINE_VERSION +FROM alpine:$ALPINE_VERSION # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ diff --git a/docs/contributors/environment.rst b/docs/contributors/environment.rst index 161619f6..b326c79c 100644 --- a/docs/contributors/environment.rst +++ b/docs/contributors/environment.rst @@ -112,7 +112,7 @@ After cloning the git repository to your workstation, you can build the images: .. code-block:: bash cd Mailu - docker-compose -f tests/build.yml build + docker-compose -f tests/build.yml build --build-arg ALPINE_VERSION=3.10 The ``build.yml`` file has two variables: @@ -125,7 +125,7 @@ To re-build only specific containers at a later time. .. code-block:: bash - docker-compose -f tests/build.yml build admin webdav + docker-compose -f tests/build.yml --build-arg ALPINE_VERSION=3.10 build admin webdav If you have to push the images to Docker Hub for testing in Docker Swarm or a remote host, you have to define ``DOCKER_ORG`` (usually your Docker user-name) and login to @@ -138,7 +138,7 @@ the hub. Password: Bar export DOCKER_ORG="Foo" export VERSION="feat-extra-app" - docker-compose -f tests/build.yml build + docker-compose -f tests/build.yml build --build-arg ALPINE_VERSION=3.10 docker-compose -f tests/build.yml push Running containers diff --git a/optional/clamav/Dockerfile b/optional/clamav/Dockerfile index 02d0279a..6375e317 100644 --- a/optional/clamav/Dockerfile +++ b/optional/clamav/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG ALPINE_VERSION +FROM alpine:$ALPINE_VERSION # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip bash \ diff --git a/optional/postgresql/Dockerfile b/optional/postgresql/Dockerfile index 4a2ccaf4..3edf45d0 100644 --- a/optional/postgresql/Dockerfile +++ b/optional/postgresql/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG ALPINE_VERSION +FROM alpine:$ALPINE_VERSION # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip bash \ diff --git a/optional/radicale/Dockerfile b/optional/radicale/Dockerfile index 66c1d5ca..98b90746 100644 --- a/optional/radicale/Dockerfile +++ b/optional/radicale/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG ALPINE_VERSION +FROM alpine:$ALPINE_VERSION RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ && apk add --no-cache radicale@testing curl bash diff --git a/services/fetchmail/Dockerfile b/services/fetchmail/Dockerfile index d68bcb14..62a826de 100644 --- a/services/fetchmail/Dockerfile +++ b/services/fetchmail/Dockerfile @@ -1,5 +1,6 @@ # First stage: Build -FROM alpine:3.10 as builder +ARG ALPINE_VERSION +FROM alpine:$ALPINE_VERSION as builder # build dependencies RUN apk add --no-cache curl tar xz autoconf git gettext build-base openssl openssl-dev @@ -10,7 +11,7 @@ RUN cd fetchmail-7.0.0-alpha6 && \ ./configure --with-ssl --prefix /usr/local --disable-nls && \ make -FROM alpine:3.10 +FROM alpine:$ALPINE_VERSION # python3 shared with most images diff --git a/services/rspamd/Dockerfile b/services/rspamd/Dockerfile index 6587eb51..d1a85a28 100644 --- a/services/rspamd/Dockerfile +++ b/services/rspamd/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG ALPINE_VERSION +FROM alpine:$ALPINE_VERSION # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ diff --git a/services/unbound/Dockerfile b/services/unbound/Dockerfile index b8e31049..4e92e7e1 100644 --- a/services/unbound/Dockerfile +++ b/services/unbound/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG ALPINE_VERSION +FROM alpine:$ALPINE_VERSION # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \