From 124b1d4c71f8ffb86df31af6365d03b2119e6a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bondis?= Date: Wed, 21 Aug 2019 12:24:30 -0400 Subject: [PATCH] rebase and update for 3.10, avoid adding qemu file to x86 images --- core/admin/Dockerfile | 3 ++- core/dovecot/Dockerfile | 3 ++- core/nginx/Dockerfile | 3 ++- core/none/Dockerfile | 3 ++- core/postfix/Dockerfile | 3 ++- optional/clamav/Dockerfile | 3 ++- optional/postgresql/Dockerfile | 3 ++- optional/radicale/Dockerfile | 3 ++- services/fetchmail/Dockerfile | 6 ++++-- services/rspamd/Dockerfile | 3 ++- services/unbound/Dockerfile | 3 ++- tests/build_arm.sh | 7 ++----- webmails/rainloop/Dockerfile | 3 ++- webmails/roundcube/Dockerfile | 3 ++- 14 files changed, 30 insertions(+), 19 deletions(-) diff --git a/core/admin/Dockerfile b/core/admin/Dockerfile index f6d28bf5..ee719b27 100644 --- a/core/admin/Dockerfile +++ b/core/admin/Dockerfile @@ -11,7 +11,8 @@ RUN mkdir static \ # Actual application -FROM alpine:3.10 +ARG DISTRO=alpine:3.10 +FROM $DISTRO # 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 4c25bfcb..404cafa5 100644 --- a/core/dovecot/Dockerfile +++ b/core/dovecot/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG DISTRO=alpine:3.10 +FROM $DISTRO # 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 2b6da845..c7eab173 100644 --- a/core/nginx/Dockerfile +++ b/core/nginx/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG DISTRO=alpine:3.10 +FROM $DISTRO # 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..b80a2d10 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 DISTRO=alpine:3.10 +FROM $DISTRO CMD sleep 1000000d diff --git a/core/postfix/Dockerfile b/core/postfix/Dockerfile index ef23f9f4..26479283 100644 --- a/core/postfix/Dockerfile +++ b/core/postfix/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG DISTRO=alpine:3.10 +FROM $DISTRO # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ diff --git a/optional/clamav/Dockerfile b/optional/clamav/Dockerfile index 02d0279a..60f8c87b 100644 --- a/optional/clamav/Dockerfile +++ b/optional/clamav/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG DISTRO=alpine:3.10 +FROM $DISTRO # 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 7f44204a..a2317426 100644 --- a/optional/postgresql/Dockerfile +++ b/optional/postgresql/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG DISTRO=alpine:3.10 +FROM $DISTRO # 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..ab819d69 100644 --- a/optional/radicale/Dockerfile +++ b/optional/radicale/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG DISTRO=alpine:3.10 +FROM $DISTRO 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 756630f6..271dd68a 100644 --- a/services/fetchmail/Dockerfile +++ b/services/fetchmail/Dockerfile @@ -1,5 +1,6 @@ # First stage: Build -FROM alpine:3.10 as builder +ARG DISTRO=alpine:3.10 +FROM $DISTRO as builder # build dependencies RUN apk add --no-cache curl tar xz autoconf git gettext build-base openssl openssl-dev @@ -10,7 +11,8 @@ RUN cd fetchmail-7.0.0-alpha6 && \ ./configure --with-ssl --prefix /usr/local --disable-nls && \ make -FROM alpine:3.10 +ARG DISTRO=alpine:3.10 +FROM $DISTRO # python3 shared with most images RUN apk add --no-cache \ diff --git a/services/rspamd/Dockerfile b/services/rspamd/Dockerfile index 1646330d..2e23a61e 100644 --- a/services/rspamd/Dockerfile +++ b/services/rspamd/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG DISTRO=alpine:3.10 +FROM $DISTRO # 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 62bc81ce..aa0abe25 100644 --- a/services/unbound/Dockerfile +++ b/services/unbound/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.10 +ARG DISTRO=alpine:3.10 +FROM $DISTRO # python3 shared with most images RUN apk add --no-cache \ python3 py3-pip git bash \ diff --git a/tests/build_arm.sh b/tests/build_arm.sh index eca34351..bf65c697 100755 --- a/tests/build_arm.sh +++ b/tests/build_arm.sh @@ -1,16 +1,13 @@ #!/bin/bash -x -ALPINE_VER="3.8" +ALPINE_VER="3.10" DISTRO="balenalib/rpi-alpine:$ALPINE_VER" -# Used for Radicale -EDGE_DISTRO="balenalib/rpi-alpine:edge" # Used for webmails -PHP="arm32v7/php:7.2-apache" +PHP="arm32v7/php:7.3-apache" # use qemu-*-static from docker container docker run --rm --privileged multiarch/qemu-user-static:register docker-compose -f build.yml build \ --build-arg DISTRO=$DISTRO \ --build-arg PHP_DISTRO=$PHP \ - --build-arg EDGE_DISTRO=$EDGE_DISTRO \ --parallel $@ diff --git a/webmails/rainloop/Dockerfile b/webmails/rainloop/Dockerfile index 140e1aff..99aa9fde 100644 --- a/webmails/rainloop/Dockerfile +++ b/webmails/rainloop/Dockerfile @@ -1,4 +1,5 @@ -FROM php:7.3-apache +ARG PHP_DISTRO=php:7.3-apache +FROM $PHP_DISTRO #Shared layer between rainloop and roundcube RUN apt-get update && apt-get install -y \ python3 curl python3-pip git \ diff --git a/webmails/roundcube/Dockerfile b/webmails/roundcube/Dockerfile index 2ed2bda2..e094e8f9 100644 --- a/webmails/roundcube/Dockerfile +++ b/webmails/roundcube/Dockerfile @@ -1,4 +1,5 @@ -FROM php:7.3-apache +ARG PHP_DISTRO=php:7.3-apache +FROM PHP_DISTRO #Shared layer between rainloop and roundcube RUN apt-get update && apt-get install -y \ python3 curl python3-pip git \