From 5c7ff5c539c75c1aab7fcd3d392f78d26e246d75 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sun, 22 Oct 2023 12:15:04 +0100 Subject: [PATCH] TARGETPLATFORM needs to be set Co-authored-by: yubiuser Signed-off-by: Adam Warner --- build-and-test.sh | 1 + src/Dockerfile | 2 +- test/cmd.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build-and-test.sh b/build-and-test.sh index 0f90186..1efec10 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -19,4 +19,5 @@ docker run --rm \ --env PIPENV_CACHE_DIR="$(pwd)/.pipenv" \ --env GIT_TAG="${GIT_TAG}" \ --env PY_COLORS=1 \ + --env TARGETPLATFORM="${PLATFORM}" \ ${enter} image_pipenv diff --git a/src/Dockerfile b/src/Dockerfile index 12fe8de..028cd2f 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -47,7 +47,7 @@ RUN git clone --depth 1 --single-branch --branch ${WEB_BRANCH} https://github.co elif [ "$TARGETPLATFORM" = "linux/386" ]; then FTLARCH=386; \ elif [ "$TARGETPLATFORM" = "linux/arm/v6" ]; then FTLARCH=armv6; \ elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then FTLARCH=armv7; \ - elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then FTLARCH=arm64; \ + elif [ "$TARGETPLATFORM" = "linux/arm64/v8" ]; then FTLARCH=arm64; \ elif [ "$TARGETPLATFORM" = "linux/riscv64" ]; then FTLARCH=riscv64; \ else FTLARCH=amd64; fi \ && echo "Arch: ${TARGETPLATFORM}, FTLARCH: ${FTLARCH}" \ diff --git a/test/cmd.sh b/test/cmd.sh index 2c753d7..193585c 100755 --- a/test/cmd.sh +++ b/test/cmd.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh set -eux -docker buildx build ./src --tag pihole:${GIT_TAG} --no-cache +docker buildx build ./src --build-arg TARGETPLATFORM="${TARGETPLATFORM}" --tag pihole:${GIT_TAG} --no-cache docker images pihole:${GIT_TAG} # auto-format the pytest code