Move alpine version definition out to variable

master
Dario Ernst 5 years ago
parent 1fa287a6d9
commit c787e4bdbd

@ -15,6 +15,7 @@ addons:
env: env:
- MAILU_VERSION=${TRAVIS_BRANCH////-} - MAILU_VERSION=${TRAVIS_BRANCH////-}
- ALPINE_VERSION=3.10
language: python language: python
python: python:
@ -26,7 +27,7 @@ install:
before_script: before_script:
- docker-compose -v - 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/*' - sudo -- sh -c 'mkdir -p /mailu && cp -r tests/certs /mailu && chmod 600 /mailu/certs/*'

@ -1,4 +1,5 @@
FROM alpine:3.10 ARG ALPINE_VERSION
FROM alpine:$ALPINE_VERSION
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 py3-pip git bash \ python3 py3-pip git bash \

@ -1,4 +1,5 @@
FROM alpine:3.10 ARG ALPINE_VERSION
FROM alpine:$ALPINE_VERSION
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 py3-pip git bash \ python3 py3-pip git bash \

@ -1,4 +1,5 @@
FROM alpine:3.10 ARG ALPINE_VERSION
FROM alpine:$ALPINE_VERSION
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 py3-pip git bash \ python3 py3-pip git bash \

@ -1,5 +1,6 @@
# This is an idle image to dynamically replace any component if disabled. # 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 CMD sleep 1000000d

@ -1,4 +1,5 @@
FROM alpine:3.10 ARG ALPINE_VERSION
FROM alpine:$ALPINE_VERSION
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 py3-pip git bash \ python3 py3-pip git bash \

@ -112,7 +112,7 @@ After cloning the git repository to your workstation, you can build the images:
.. code-block:: bash .. code-block:: bash
cd Mailu 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: The ``build.yml`` file has two variables:
@ -125,7 +125,7 @@ To re-build only specific containers at a later time.
.. code-block:: bash .. 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 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 host, you have to define ``DOCKER_ORG`` (usually your Docker user-name) and login to
@ -138,7 +138,7 @@ the hub.
Password: Bar Password: Bar
export DOCKER_ORG="Foo" export DOCKER_ORG="Foo"
export VERSION="feat-extra-app" 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 docker-compose -f tests/build.yml push
Running containers Running containers

@ -1,4 +1,5 @@
FROM alpine:3.10 ARG ALPINE_VERSION
FROM alpine:$ALPINE_VERSION
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 py3-pip bash \ python3 py3-pip bash \

@ -1,4 +1,5 @@
FROM alpine:3.10 ARG ALPINE_VERSION
FROM alpine:$ALPINE_VERSION
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 py3-pip bash \ python3 py3-pip bash \

@ -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 \ RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --no-cache radicale@testing curl bash && apk add --no-cache radicale@testing curl bash

@ -1,5 +1,6 @@
# First stage: Build # First stage: Build
FROM alpine:3.10 as builder ARG ALPINE_VERSION
FROM alpine:$ALPINE_VERSION as builder
# build dependencies # build dependencies
RUN apk add --no-cache curl tar xz autoconf git gettext build-base openssl openssl-dev 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 && \ ./configure --with-ssl --prefix /usr/local --disable-nls && \
make make
FROM alpine:3.10 FROM alpine:$ALPINE_VERSION
# python3 shared with most images # python3 shared with most images

@ -1,4 +1,5 @@
FROM alpine:3.10 ARG ALPINE_VERSION
FROM alpine:$ALPINE_VERSION
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 py3-pip git bash \ python3 py3-pip git bash \

@ -1,4 +1,5 @@
FROM alpine:3.10 ARG ALPINE_VERSION
FROM alpine:$ALPINE_VERSION
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 py3-pip git bash \ python3 py3-pip git bash \

Loading…
Cancel
Save