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) <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,11 @@ ENV HTTP_PROXY=${HTTP_PROXY} \
|
|||||||
# resolve to the correct platform. Framework-dependent output — apphost stays
|
# resolve to the correct platform. Framework-dependent output — apphost stays
|
||||||
# at /p:UseAppHost=false.
|
# at /p:UseAppHost=false.
|
||||||
ARG TARGETARCH
|
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"
|
echo "Building for TARGETARCH=$TARGETARCH -> RID=$DOTNET_RID"
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
Reference in New Issue
Block a user