From 43a3d3f1e0048058a1e893582cd7c4e03138637b Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 19 Dec 2021 15:44:46 +0100 Subject: [PATCH] Remove BUILD_ARCH dependency --- portainer/Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/portainer/Dockerfile b/portainer/Dockerfile index d84d7998b..97b2fdea5 100644 --- a/portainer/Dockerfile +++ b/portainer/Dockerfile @@ -28,10 +28,13 @@ ARG BUILD_ARCH=amd64 ARG BUILD_UPSTREAM="2.11.0" RUN \ - if [ "${BUILD_ARCH}" = "aarch64" ]; then ARCH="arm64"; fi \ - && if [ "${BUILD_ARCH}" = "armhf" ]; then ARCH="arm"; fi \ - && if [ "${BUILD_ARCH}" = "armv7" ]; then ARCH="arm"; fi \ - && if [ "${BUILD_ARCH}" = "amd64" ]; then ARCH="amd64"; fi \ + BUILD_ARCH=$(uname -m) \ + && echo "${BUILD_ARCH}" \ + && if [ "${BUILD_ARCH}" = "*aarch64*" ]; then ARCH="arm64"; fi \ + && if [ "${BUILD_ARCH}" = "*armv8*" ]; then ARCH="arm64"; fi \ + && if [ "${BUILD_ARCH}" = "*armhf*" ]; then ARCH="arm"; fi \ + && if [ "${BUILD_ARCH}" = "*armv7*" ]; then ARCH="arm"; fi \ + && if [ "${BUILD_ARCH}" = "*x86*" ]; then ARCH="amd64"; fi \ \ && curl -L -s \ "https://github.com/portainer/portainer/releases/download/${BUILD_UPSTREAM}/portainer-${BUILD_UPSTREAM}-linux-${ARCH}.tar.gz" \