From c8b90618d12778a9948bff7bf662cdcd5d63d354 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 17 Oct 2022 09:41:08 +0300 Subject: [PATCH] Add gosu mapping for linux/386 and linux/arm64/v8 architectures --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ef3b041..a5cbcb8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,14 +36,16 @@ RUN addgroup -S ${NAGIOS_GROUP} && \ perl-timedate perl-libwww perl-text-glob samba-client openssh openssl \ net-snmp-tools bind-tools gd gd-dev && \ \ + : '# For x86 the binary is : gosu-i386' && \ : '# For x64 the binary is : gosu-amd64' && \ : '# For arm-v6 the binary is : gosu-armel' && \ : '# For arm-v7 the binary is : gosu-armhf' && \ : '# For arm64 the binary is : gosu-arm64' && \ + : '# For arm64/v8 the binary is : gosu-arm64' && \ : '#######################################' && \ : '# Creating an associative array with the platforms and their respective gosu release DOES NOT WORK in /bin/sh' && \ echo "Arguments TARGETPLATFORM: ${TARGETPLATFORM} and BUILDPLATFORM: ${BUILDPLATFORM}" && \ - echo "$TARGETPLATFORM" | awk '{ gosuBinArr["linux/amd64"]="gosu-amd64"; gosuBinArr["linux/arm/v6"]="gosu-armel"; gosuBinArr["linux/arm/v7"]="gosu-armhf"; gosuBinArr["linux/arm64"]="gosu-arm64"; print gosuBinArr[$0];}' > mygosuver.txt && \ + echo "$TARGETPLATFORM" | awk '{ gosuBinArr["linux/386"]="gosu-i386"; gosuBinArr["linux/amd64"]="gosu-amd64"; gosuBinArr["linux/arm/v6"]="gosu-armel"; gosuBinArr["linux/arm/v7"]="gosu-armhf"; gosuBinArr["linux/arm64"]="gosu-arm64"; gosuBinArr["linux/arm64/v8"]="gosu-arm64"; print gosuBinArr[$0];}' > mygosuver.txt && \ gosuPlatform=$(cat mygosuver.txt) && \ echo "Downloading ${gosuPlatform} for platform $TARGETPLATFORM" &&\ curl -L -o gosu "https://github.com/tianon/gosu/releases/download/1.13/${gosuPlatform}" && \