🏁 Fix docker build

This commit is contained in:
SweetMNM 2022-06-07 19:33:03 +03:00
parent 97183fff97
commit 3943115b18
1 changed files with 14 additions and 11 deletions

View File

@ -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 && \