mirror of
https://github.com/static-web-server/static-web-server.git
synced 2026-01-25 05:06:33 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user