From 05efe5e1258edc7381360c54c53efa6ce7ac580a Mon Sep 17 00:00:00 2001 From: nanxun Date: Fri, 3 Jul 2026 17:19:53 +0800 Subject: [PATCH] fix: correct case statement syntax in TARGETARCH -> RID mapping The previous inline case statement was missing proper variable assignment. Use 'case' to set DOTNET_RID directly instead of trying to capture output of a command substitution that contained a multi-branch case. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/LiveRecorder.WebApi/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/LiveRecorder.WebApi/Dockerfile b/src/LiveRecorder.WebApi/Dockerfile index c355119..91fd44e 100644 --- a/src/LiveRecorder.WebApi/Dockerfile +++ b/src/LiveRecorder.WebApi/Dockerfile @@ -24,7 +24,11 @@ ENV HTTP_PROXY=${HTTP_PROXY} \ # resolve to the correct platform. Framework-dependent output — apphost stays # at /p:UseAppHost=false. ARG TARGETARCH -RUN DOTNET_RID=$(case "$TARGETARCH" in amd64) echo linux-x64 ;; arm64) echo linux-arm64 ;; *) echo "unknown: $TARGETARCH" >&2; exit 1 ;; esac) ; \ +RUN case "$TARGETARCH" in \ + amd64) DOTNET_RID=linux-x64 ;; \ + arm64) DOTNET_RID=linux-arm64 ;; \ + *) echo "ERROR: unknown TARGETARCH=$TARGETARCH" >&2; exit 1 ;; \ + esac ; \ echo "Building for TARGETARCH=$TARGETARCH -> RID=$DOTNET_RID" COPY . .