fix: Dockerfile warnings

WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 4)
WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 37)
WARN: FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 4)
This commit is contained in:
Robin C. Ladiges
2024-10-13 06:16:05 +02:00
committed by Aubrey
parent cbbb1b90c9
commit 836b8c5fdd

View File

@@ -1,7 +1,7 @@
################################################################################
################################################################## build ###
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:6.0 as build
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /app/
@@ -34,7 +34,7 @@ RUN dotnet publish \
################################################################################
################################################################ runtime ###
FROM mcr.microsoft.com/dotnet/runtime:6.0 as runtime
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS runtime
# Copy application binary from build stage
COPY --from=build /app/out/ /app/