diff --git a/dockerfile/cosmos/Dockerfile b/dockerfile/cosmos/Dockerfile index fc053e5..12e536a 100644 --- a/dockerfile/cosmos/Dockerfile +++ b/dockerfile/cosmos/Dockerfile @@ -51,7 +51,7 @@ RUN set -eux;\ LIBDIR=/usr/aarch64-linux-musl/lib;\ mkdir -p $LIBDIR;\ export CC=aarch64-linux-musl-gcc CXX=aarch64-linux-musl-g++;\ - fi;\ + fi;\ elif [ "${TARGETARCH}" = "amd64" ]; then\ export ARCH=x86_64;\ if [ "${BUILDARCH}" != "amd64" ]; then\ @@ -64,10 +64,10 @@ RUN set -eux;\ WASMVM_REPO=$(echo $WASMVM_VERSION | awk '{print $1}');\ WASMVM_VERS=$(echo $WASMVM_VERSION | awk '{print $2}');\ wget -O $LIBDIR/libwasmvm_muslc.a https://${WASMVM_REPO}/releases/download/${WASMVM_VERS}/libwasmvm_muslc.${ARCH}.a;\ - cp $LIBDIR/libwasmvm_muslc.a $LIBDIR/libwasmvm.x86_64.a;\ - cp $LIBDIR/libwasmvm_muslc.a $LIBDIR/libwasmvm_muslc.x86_64.a;\ - cp $LIBDIR/libwasmvm_muslc.a $LIBDIR/libwasmvm.aarch64.a;\ - cp $LIBDIR/libwasmvm_muslc.a $LIBDIR/libwasmvm_muslc.aarch64.a;\ + ln $LIBDIR/libwasmvm_muslc.a $LIBDIR/libwasmvm.x86_64.a;\ + ln $LIBDIR/libwasmvm_muslc.a $LIBDIR/libwasmvm_muslc.x86_64.a;\ + ln $LIBDIR/libwasmvm_muslc.a $LIBDIR/libwasmvm.aarch64.a;\ + ln $LIBDIR/libwasmvm_muslc.a $LIBDIR/libwasmvm_muslc.aarch64.a;\ fi;\ export GOOS=linux GOARCH=$TARGETARCH CGO_ENABLED=1 LDFLAGS='-linkmode external -extldflags "-static"';\ if [ ! -z "$PRE_BUILD" ]; then sh -c "${PRE_BUILD}"; fi;\ diff --git a/dockerfile/cosmos/local.Dockerfile b/dockerfile/cosmos/local.Dockerfile index a5c3931..b70854e 100644 --- a/dockerfile/cosmos/local.Dockerfile +++ b/dockerfile/cosmos/local.Dockerfile @@ -19,6 +19,7 @@ RUN set -eux; \ WASMVM_REPO=$(echo $WASMVM_VERSION | awk '{print $1}');\ WASMVM_VERS=$(echo $WASMVM_VERSION | awk '{print $2}');\ wget -O /lib/libwasmvm_muslc.a https://${WASMVM_REPO}/releases/download/${WASMVM_VERS}/libwasmvm_muslc.$(uname -m).a;\ + ln /lib/libwasmvm_muslc.a /lib/libwasmvm_muslc.$(uname -m).a;\ fi; ARG BUILD_DIR diff --git a/dockerfile/cosmos/localcross.Dockerfile b/dockerfile/cosmos/localcross.Dockerfile index 2fd5869..3c837cc 100644 --- a/dockerfile/cosmos/localcross.Dockerfile +++ b/dockerfile/cosmos/localcross.Dockerfile @@ -49,7 +49,7 @@ RUN set -eux;\ LIBDIR=/usr/aarch64-linux-musl/lib;\ mkdir -p $LIBDIR;\ export CC=aarch64-linux-musl-gcc CXX=aarch64-linux-musl-g++;\ - fi;\ + fi;\ elif [ "${TARGETARCH}" = "amd64" ]; then\ export ARCH=x86_64;\ if [ "${BUILDARCH}" != "amd64" ]; then\ @@ -62,6 +62,7 @@ RUN set -eux;\ WASMVM_REPO=$(echo $WASMVM_VERSION | awk '{print $1}');\ WASMVM_VERS=$(echo $WASMVM_VERSION | awk '{print $2}');\ wget -O $LIBDIR/libwasmvm_muslc.a https://${WASMVM_REPO}/releases/download/${WASMVM_VERS}/libwasmvm_muslc.${ARCH}.a;\ + ln $LIBDIR/libwasmvm_muslc.a $LIBDIR/libwasmvm_muslc.$(uname -m).a;\ fi;\ export GOOS=linux GOARCH=$TARGETARCH CGO_ENABLED=1 LDFLAGS='-linkmode external -extldflags "-static"';\ if [ ! -z "$PRE_BUILD" ]; then sh -c "${PRE_BUILD}"; fi;\ diff --git a/dockerfile/cosmos/native.Dockerfile b/dockerfile/cosmos/native.Dockerfile index 5b21121..6d66d2e 100644 --- a/dockerfile/cosmos/native.Dockerfile +++ b/dockerfile/cosmos/native.Dockerfile @@ -42,6 +42,7 @@ RUN set -eux;\ WASMVM_REPO=$(echo $WASMVM_VERSION | awk '{print $1}');\ WASMVM_VERS=$(echo $WASMVM_VERSION | awk '{print $2}');\ wget -O /lib/libwasmvm_muslc.a https://${WASMVM_REPO}/releases/download/${WASMVM_VERS}/libwasmvm_muslc.$(uname -m).a;\ + ln /lib/libwasmvm_muslc.a /lib/libwasmvm_muslc.$(uname -m).a;\ fi;\ export CGO_ENABLED=1 LDFLAGS='-linkmode external -extldflags "-static"';\ if [ ! -z "$PRE_BUILD" ]; then sh -c "${PRE_BUILD}"; fi;\