Utilise conditional docker base image

windows is no longer part of the 9.0 manifest
This commit is contained in:
Luke 2025-02-02 16:36:28 +10:00
parent 3e08982e73
commit 17e37dd8bd

View file

@ -30,7 +30,11 @@ RUN \
dotnet publish -o output/ -r "${ARCH}" -v m -f net9.0 -c Release -p:PublishSingleFile=true --self-contained false dotnet publish -o output/ -r "${ARCH}" -v m -f net9.0 -c Release -p:PublishSingleFile=true --self-contained false
# Runtime image # Runtime image
FROM --platform=${TARGETPLATFORM} mcr.microsoft.com/dotnet/runtime:9.0 AS runner FROM mcr.microsoft.com/dotnet/runtime:9.0 AS linux_base
FROM mcr.microsoft.com/dotnet/runtime:9.0-nanoserver-ltsc2022 AS windows_base
FROM ${TARGETOS}_base AS final
WORKDIR /server WORKDIR /server
COPY --from=builder /TShock/TShockLauncher/output ./ COPY --from=builder /TShock/TShockLauncher/output ./