From f9cfd204bf0698a55484766f87cacbec283974d0 Mon Sep 17 00:00:00 2001 From: Derek Holloway Date: Thu, 10 Jul 2025 18:25:51 -0700 Subject: [PATCH] improve for bin/sh --- Dockerfile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa8a6ef..94cf30e 100755 --- a/Dockerfile +++ b/Dockerfile @@ -43,15 +43,12 @@ COPY ./src/MistoxWebsite.Server/ ./ ARG TARGETOS TARGETARCH # Build the source -RUN if [ "$TARGETARCH" = "arm64" ]; then \ - RID="arm64" \ - elif [ "$TARGETARCH" = "amd64" ]; then \ - RID="x64" \ - else \ - echo "Unsupported ARCH: $TARGETARCH" \ - exit 1 \ +RUN set -e && \ + if [ "$TARGETARCH" = "arm64" ]; then RID="arm64"; \ + elif [ "$TARGETARCH" = "amd64" ]; then RID="x64"; \ + else echo "Unsupported ARCH: $TARGETARCH"; exit 1; \ fi && \ - dotnet publish './MistoxWebsite.Server.csproj' -c Release -r $TARGETOS-$RID -o /app/publish + dotnet publish './MistoxWebsite.Server.csproj' -c Release -r linux-$RID -o /app/publish ################ ## Publish ##