From 3943115b18bf2e4e41dc1f77c5336e9522906cc4 Mon Sep 17 00:00:00 2001 From: SweetMNM <44876816+SweetMNM@users.noreply.github.com> Date: Tue, 7 Jun 2022 19:33:03 +0300 Subject: [PATCH] :checkered_flag: Fix docker build --- Dockerfile | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0ce255b..8c011dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,11 @@ FROM debian:bullseye-slim ARG TARGETPLATFORM -ARG ARCH=$(case ${TARGETPLATFORM:-linux/amd64} in \ - "linux/amd64") echo "amd64" ;; \ - "linux/arm64") echo "aarch64" ;; \ - *) echo "" ;; esac) +# ARG ARCH=$(case ${TARGETPLATFORM:-linux/amd64} in \ +# "linux/amd64") echo "amd64" ;; \ +# "linux/arm64") echo "aarch64" ;; \ +# *) echo "" ;; esac) ARG S6_VERSION="2.2.0.3" -RUN export ARCH=$(case ${TARGETPLATFORM:-linux/amd64} in \ - "linux/amd64") echo "amd64" ;; \ - "linux/arm64") echo "aarch64" ;; \ - *) echo "" ;; esac) \ - && echo "ARCH=${ARCH}, ARCH2=$ARCH" ENV DEBIAN_FRONTEND="noninteractive" \ HOME="/root" \ @@ -18,11 +13,19 @@ ENV DEBIAN_FRONTEND="noninteractive" \ LANG="en_US.UTF-8" \ LC_ALL="en_US.UTF-8" \ TERM="xterm" \ - S6_EXPECTED_SHA256="a7076cf205b331e9f8479bbb09d9df77dbb5cd8f7d12e9b74920902e0c16dd98" \ S6_DOWNLOAD="https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-${ARCH}.tar.gz" # Install third party software -RUN set -x && \ +RUN export ARCH=$(case ${TARGETPLATFORM:-linux/amd64} in \ + "linux/amd64") echo "amd64" ;; \ + "linux/arm64") echo "aarch64" ;; \ + *) echo "" ;; esac) && \ + export S6_EXPECTED_SHA256=$(case ${TARGETPLATFORM:-linux/amd64} in \ + "linux/amd64") echo "a7076cf205b331e9f8479bbb09d9df77dbb5cd8f7d12e9b74920902e0c16dd98" ;; \ + "linux/arm64") echo "84f585a100b610124bb80e441ef2dc2d68ac2c345fd393d75a6293e0951ccfc5" ;; \ + *) echo "" ;; esac) && \ + echo "Building for arch: ${ARCH}, expecting S6 SHA256: ${S6_EXPECTED_SHA256}" && \ + set -x && \ apt-get update && \ apt-get -y --no-install-recommends install locales && \ echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \