From 39fb3b7ab00ae9bb7da894cb26dd98b8fb408c0e Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Wed, 16 Feb 2022 16:24:45 +0100 Subject: [PATCH] Docker: Pull prod base images before building preview and release --- Makefile | 40 ++++++++++++++++++++++++++++------------ scripts/docker/build.sh | 8 ++++---- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 5ad04191f..e867c1c8a 100644 --- a/Makefile +++ b/Makefile @@ -222,40 +222,56 @@ docker-preview: docker-preview-bullseye docker-preview-buster docker-preview-imp docker-preview-bullseye: docker pull --platform=amd64 photoprism/develop:bullseye docker pull --platform=arm64 photoprism/develop:bullseye + docker pull --platform=amd64 debian:bullseye-slim + docker pull --platform=arm64 debian:bullseye-slim scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 preview /bullseye +docker-preview-arm64: + docker pull --platform=arm64 photoprism/develop:bullseye + docker pull --platform=arm64 debian:bullseye-slim + scripts/docker/buildx.sh photoprism linux/arm64 preview-arm64 /bullseye +docker-preview-armv7: + docker pull --platform=arm photoprism/develop:armv7 + docker pull --platform=arm debian:bullseye-slim + scripts/docker/buildx.sh photoprism linux/arm preview-armv7 /armv7 docker-preview-buster: docker pull --platform=amd64 photoprism/develop:buster docker pull --platform=arm64 photoprism/develop:buster + docker pull --platform=amd64 debian:buster-slim + docker pull --platform=arm64 debian:buster-slim scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 preview-buster /buster docker-preview-impish: docker pull --platform=amd64 photoprism/develop:latest docker pull --platform=arm64 photoprism/develop:latest + docker pull --platform=amd64 ubuntu:impish + docker pull --platform=arm64 ubuntu:impish scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 preview-impish /impish -docker-preview-arm64: - docker pull --platform=arm64 photoprism/develop:bullseye - scripts/docker/buildx.sh photoprism linux/arm64 preview-arm64 /bullseye -docker-preview-armv7: - docker pull --platform=arm photoprism/develop:armv7 - scripts/docker/buildx.sh photoprism linux/arm preview-armv7 /armv7 docker-release: docker-release-bullseye docker-release-buster docker-release-impish docker-release-bullseye: docker pull --platform=amd64 photoprism/develop:bullseye docker pull --platform=arm64 photoprism/develop:bullseye + docker pull --platform=amd64 debian:bullseye-slim + docker pull --platform=arm64 debian:bullseye-slim scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 bullseye /bullseye "-t photoprism/photoprism:latest" +docker-release-arm64: + docker pull --platform=arm64 photoprism/develop:bullseye + docker pull --platform=arm64 debian:bullseye-slim + scripts/docker/buildx.sh photoprism linux/arm64 arm64 /bullseye +docker-release-armv7: + docker pull --platform=arm photoprism/develop:armv7 + docker pull --platform=arm debian:bullseye-slim + scripts/docker/buildx.sh photoprism linux/arm armv7 /armv7 docker-release-buster: docker pull --platform=amd64 photoprism/develop:buster docker pull --platform=arm64 photoprism/develop:buster + docker pull --platform=amd64 debian:buster-slim + docker pull --platform=arm64 debian:buster-slim scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 buster /buster docker-release-impish: docker pull --platform=amd64 photoprism/develop:impish docker pull --platform=arm64 photoprism/develop:impish + docker pull --platform=amd64 ubuntu:impish + docker pull --platform=arm64 ubuntu:impish scripts/docker/buildx-multi.sh photoprism linux/amd64,linux/arm64 impish /impish -docker-release-arm64: - docker pull --platform=arm64 photoprism/develop:bullseye - scripts/docker/buildx.sh photoprism linux/arm64 arm64 /bullseye -docker-release-armv7: - docker pull --platform=arm photoprism/develop:armv7 - scripts/docker/buildx.sh photoprism linux/arm armv7 /armv7 docker-local: scripts/docker/build.sh photoprism docker-pull: diff --git a/scripts/docker/build.sh b/scripts/docker/build.sh index f8826d3b6..5c0df1a4f 100755 --- a/scripts/docker/build.sh +++ b/scripts/docker/build.sh @@ -17,8 +17,8 @@ DOCKER_TAG=$(date -u +%Y%m%d) if [[ $1 ]] && [[ -z $2 || $2 == "preview" ]]; then echo "docker/build: building photoprism/$1:preview from docker/${1/-//}$3/Dockerfile..."; docker build \ - --no-cache \ --pull \ + --no-cache \ --build-arg BUILD_TAG=$DOCKER_TAG \ --build-arg GOPROXY \ --build-arg GODEBUG \ @@ -32,8 +32,8 @@ elif [[ $2 =~ $NUMERIC ]]; then fi docker build $4\ - --no-cache \ --pull \ + --no-cache \ --build-arg BUILD_TAG=$2 \ --build-arg GOPROXY \ --build-arg GODEBUG \ @@ -48,8 +48,8 @@ elif [[ $2 == *"preview"* ]]; then fi docker build $4\ - --no-cache \ --pull \ + --no-cache \ --build-arg BUILD_TAG=$DOCKER_TAG \ --build-arg GOPROXY \ --build-arg GODEBUG \ @@ -63,8 +63,8 @@ else fi docker build $4\ - --no-cache \ --pull \ + --no-cache \ --build-arg BUILD_TAG=$DOCKER_TAG \ --build-arg GOPROXY \ --build-arg GODEBUG \