From 76ccc565d0e812a127a8a5ec232789499eb8cf63 Mon Sep 17 00:00:00 2001 From: Alastair Weakley Date: Mon, 24 Jun 2024 15:40:33 +1000 Subject: [PATCH] Try targetplatform --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8e1a17a..0113fa0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,10 @@ RUN apk update \ ENV DOCKERIZE_VERSION=0.5.0 -RUN apkArch="$(apk --print-arch)"; \ -case "$apkArch" in \ - armhf) export DOCKERIZE_ARCH='armhf' ;; \ - x86) export DOCKERIZE_ARCH='amd64' ;; \ -esac; +ARG TARGETPLATFORM +RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then DOCKERIZE_ARCH=amd64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then DOCKERIZE_ARCH=armhf; else DOCKERIZE_ARCH=amd64; fi + +RUN "DOCKERIZE_ARCH=${DOCKERIZE_ARCH}" RUN wget -nv -O - "https://github.com/jwilder/dockerize/releases/download/v${DOCKERIZE_VERSION}/dockerize-linux-${DOCKERIZE_ARCH}-v${DOCKERIZE_VERSION}.tar.gz" | tar -xz -C /usr/local/bin/ -f -