refactor: prefer dynamically-linked binaries for Debian Docker images (#588)

* refactor: prefer dynamically-linked binaries for debian docker images
* fix: disable dynamically-linked binary execution tests
   As dynamically-linked binaries can not be executed for obvious reasons
* docs: improve os/arch section
This commit is contained in:
Jose Quintana
2025-11-29 03:04:56 +01:00
committed by GitHub
parent afddfd6e58
commit c66c791ca9
4 changed files with 40 additions and 18 deletions

View File

@@ -15,11 +15,13 @@ RUN set -eux \
RUN set -ex \
&& case "$TARGETPLATFORM" in \
"linux/amd64") target='x86_64-unknown-linux-musl' ;; \
"linux/arm64") target='aarch64-unknown-linux-musl' ;; \
"linux/386") target='i686-unknown-linux-musl' ;; \
"linux/amd64") target='x86_64-unknown-linux-gnu' ;; \
"linux/arm64") target='aarch64-unknown-linux-gnu' ;; \
"linux/386") target='i686-unknown-linux-gnu' ;; \
# TODO: linux/arm/v7 will use 'gnueabihf' instead of 'musleabihf' binary once available \
# "linux/arm/v7") target='armv7-unknown-linux-gnueabihf' ;; \
"linux/arm/v7") target='armv7-unknown-linux-musleabihf' ;; \
"linux/arm/v6") target='arm-unknown-linux-musleabihf' ;; \
"linux/arm/v6") target='arm-unknown-linux-gnueabihf' ;; \
"linux/ppc64le") target='powerpc64le-unknown-linux-gnu' ;; \
"linux/s390x") target='s390x-unknown-linux-gnu' ;; \
*) echo >&2 "error: unsupported $TARGETPLATFORM architecture"; exit 1 ;; \
@@ -37,14 +39,7 @@ RUN set -ex \
&& uname -a \
&& cat /etc/os-release \
&& echo VERSION_NUMBER=$(cat /etc/debian_version) \
&& case "$TARGETPLATFORM" in \
**ppc64*|*s390x*) \
echo "warn: can not run sws binary on $TARGETPLATFORM architecture" ;; \
*) \
static-web-server --version; \
static-web-server --help; \
;; \
esac \
&& echo TARGET_PLATFORM=$TARGETPLATFORM \
&& file /usr/local/bin/static-web-server \
&& true