Skip to content

Commit

Permalink
fixfr
Browse files Browse the repository at this point in the history
  • Loading branch information
sheurich committed Feb 28, 2024
1 parent 42e6284 commit 7087a64
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ FROM --platform=${TARGETPLATFORM} mcr.microsoft.com/windows/nanoserver:ltsc2022
# Use build arguments to select the appropriate binary for Linux
FROM linux-base AS linux
ARG APP
ARG TARGETOS
ARG TARGETARCH
COPY --from=dist-files /${TARGETOS}/${TARGETARCH}/${APP} /app
CMD /app
CMD ["/app"]

# Use build arguments to select the appropriate binary for Windows
FROM windows-base AS windows
ARG APP
ARG TARGETOS
ARG TARGETARCH
COPY --from=dist-files /${TARGETOS}/${TARGETARCH}/${APP}.exe /app.exe
CMD /app.exe
CMD ["/app.exe"]

# Final stage: dynamically select between Linux and Windows stages based on TARGETOS argument
FROM ${TARGETOS} AS final

0 comments on commit 7087a64

Please sign in to comment.