Skip to content

Commit

Permalink
Alter Dockerfile.windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalaiselvi84 committed Aug 11, 2023
1 parent 591cadd commit ae92696
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/simple-game-server/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
# Build Stage
ARG WINDOWS_VERSION=ltsc2019

FROM golang:1.20.4-windowsservercore as builder
SHELL ["powershell", "-command"]
FROM --platform=linux/amd64 golang:1.20.4 as base

WORKDIR /gopath/src
COPY . agones.dev/agones
COPY . /gopath/src/
RUN dir

WORKDIR /gopath/src/agones.dev/agones/examples/simple-game-server
RUN GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o bin/simple-game-server.exe main.go

FROM mcr.microsoft.com/windows/servercore:${WINDOWS_VERSION}
WORKDIR /
RUN dir

COPY --from=builder /gopath/src/examples/simple-game-server/bin/simple-game-server.exe /server
COPY --from=base /gopath/src/agones.dev/agones/bin/simple-game-server.exe /server

EXPOSE 7654
USER ContainerUser
Expand Down

0 comments on commit ae92696

Please sign in to comment.