From 892f3ecc8d3c6b99004c1575f49fc04ddee9b90a Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 13 Oct 2024 02:09:18 +0200 Subject: [PATCH] Docker: fix arm64 build in non-release mode [ci skip] --- docker/ubuntu-full/Dockerfile | 3 ++- docker/util.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/ubuntu-full/Dockerfile b/docker/ubuntu-full/Dockerfile index a061de5be7bd..b4737c427ba6 100644 --- a/docker/ubuntu-full/Dockerfile +++ b/docker/ubuntu-full/Dockerfile @@ -344,7 +344,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ && apt-get update -y \ && apt-get install -y --fix-missing --no-install-recommends libgflags-dev${APT_ARCH_SUFFIX} RUN --mount=type=cache,id=ubuntu-full-libjxl,target=$HOME/.cache \ - git clone https://github.com/libjxl/libjxl.git --recursive \ + . /buildscripts/bh-set-envvars.sh \ + && git clone https://github.com/libjxl/libjxl.git --recursive \ && if [ -n "${RSYNC_REMOTE:-}" ]; then \ echo "Downloading cache..."; \ rsync -ra "${RSYNC_REMOTE}/libjxl/${GCC_ARCH}/" "$HOME/.cache/"; \ diff --git a/docker/util.sh b/docker/util.sh index aa44c8f4632f..eadc800b6193 100755 --- a/docker/util.sh +++ b/docker/util.sh @@ -352,7 +352,7 @@ EOF echo "${TARGET_BASE_IMAGE_DIGEST}" BUILD_ARGS+=("--build-arg" "TARGET_ARCH=${ARCH_PLATFORM_ARCH}") #BUILD_ARGS+=("--build-arg" "TARGET_BASE_IMAGE=${BASE_IMAGE}@${TARGET_BASE_IMAGE_DIGEST}") - BUILD_ARGS+=("--build-arg" "TARGET_BASE_IMAGE=${TARGET_BASE_IMAGE_DIGEST}") + BUILD_ARGS+=("--build-arg" "TARGET_BASE_IMAGE=arm64v8/${BASE_IMAGE}") # echo "${BUILD_ARGS[@]}" fi elif test "${DOCKER_BUILDX}" != "buildx" -a \( "${IMAGE_NAME}" = "osgeo/gdal:alpine-small-latest" -o "${IMAGE_NAME}" = "osgeo/gdal:alpine-normal-latest" \); then