diff --git a/Installer/Docker/build-images.sh b/Installer/Docker/build-images.sh index 13cc5b18a3..68143999a3 100755 --- a/Installer/Docker/build-images.sh +++ b/Installer/Docker/build-images.sh @@ -55,6 +55,7 @@ docker buildx create --use --name duplicati-multiarch docker buildx build \ ${args} \ --platform ${PLATFORMS} \ + --build-arg PARENT_IMAGE="$(cat mono_image.txt)-slim" \ --build-arg VERSION=${VERSION} \ --build-arg CHANNEL=${CHANNEL} \ --file context/Dockerfile \ diff --git a/Installer/Docker/context/Dockerfile b/Installer/Docker/context/Dockerfile index ffcd6e3cc2..cc4c1ca62c 100644 --- a/Installer/Docker/context/Dockerfile +++ b/Installer/Docker/context/Dockerfile @@ -1,4 +1,5 @@ -FROM --platform=$TARGETPLATFORM mono:5-slim +ARG PARENT_IMAGE +FROM --platform=$TARGETPLATFORM ${PARENT_IMAGE} RUN apt-get update && \ apt-get install -y --no-install-recommends \ diff --git a/Installer/Docker/mono_image.txt b/Installer/Docker/mono_image.txt new file mode 100644 index 0000000000..62ea9e2abd --- /dev/null +++ b/Installer/Docker/mono_image.txt @@ -0,0 +1 @@ +mono:6 diff --git a/pipeline/shared/duplicati.sh b/pipeline/shared/duplicati.sh index c58546e3cc..720a37af5d 100644 --- a/pipeline/shared/duplicati.sh +++ b/pipeline/shared/duplicati.sh @@ -6,4 +6,4 @@ declare -a FORWARD_OPTS export UPDATE_SOURCE="${DUPLICATI_ROOT}/Updates/build/${BUILDTAG}_source" export UPDATE_TARGET="${DUPLICATI_ROOT}/Updates/build/${BUILDTAG}_target" - +export MONO_IMAGE="$(cat "${TRAVIS_BUILD_DIR}/Installer/Docker/mono_image.txt")" diff --git a/pipeline/stage_build/trigger.sh b/pipeline/stage_build/trigger.sh index c583ffc8b8..71dc7593df 100755 --- a/pipeline/stage_build/trigger.sh +++ b/pipeline/stage_build/trigger.sh @@ -1,7 +1,8 @@ #!/bin/bash . error_handling.sh +. ./pipeline/shared/duplicati.sh PACKAGES="libgtk2.0-cil rsync" -docker-run --image mono \ +docker-run --image "${MONO_IMAGE}" \ --packages "$PACKAGES" \ ---command "/pipeline/stage_build/job.sh" $@ \ No newline at end of file +--command "/pipeline/stage_build/job.sh" $@ diff --git a/pipeline/stage_unittests/trigger.sh b/pipeline/stage_unittests/trigger.sh index 4d493175a1..4d3e414443 100755 --- a/pipeline/stage_unittests/trigger.sh +++ b/pipeline/stage_unittests/trigger.sh @@ -1,7 +1,8 @@ #!/bin/bash . error_handling.sh +. ./pipeline/shared/duplicati.sh PACKAGES="wget unzip rsync" -docker-run --image mono \ +docker-run --image "${MONO_IMAGE}" \ --packages "$PACKAGES" \ ---command "/pipeline/stage_unittests/job.sh" $@ \ No newline at end of file +--command "/pipeline/stage_unittests/job.sh" $@