Clear default Dockerfile assignments for *PLATFORM
These kept Docker buildx from automatically building for multiple platforms.
This commit is contained in:
parent
5d585bb891
commit
93749be8bf
2 changed files with 10 additions and 8 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -1,10 +1,8 @@
|
|||
ARG TARGETPLATFORM=linux/amd64
|
||||
ARG BUILDPLATFORM=${TARGETPLATFORM}
|
||||
# TARGETPLATFORM and BUILDPLATFORM are automatically filled in by Docker buildx.
|
||||
# They should not be set in the global scope manually.
|
||||
|
||||
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:6.0 AS builder
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
# Copy build context
|
||||
WORKDIR /TShock
|
||||
COPY . ./
|
||||
|
|
@ -12,6 +10,10 @@ COPY . ./
|
|||
# Build and package release based on target architecture
|
||||
RUN dotnet build -v m
|
||||
WORKDIR /TShock/TShockLauncher
|
||||
|
||||
# Make TARGETPLATFORM available to the container.
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
RUN \
|
||||
case "${TARGETPLATFORM}" in \
|
||||
"linux/amd64") export ARCH="linux-x64" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue