mirror of
https://github.com/watn3y/steamsalty.git
synced 2025-06-07 15:21:00 +02:00
add cross-compile
This commit is contained in:
parent
453f03d832
commit
96db61831c
2 changed files with 8 additions and 8 deletions
11
Dockerfile
11
Dockerfile
|
@ -1,12 +1,15 @@
|
|||
FROM golang:alpine AS builder
|
||||
FROM --platform=$BUILDPLATFORM golang:1.23.4-alpine AS builder
|
||||
|
||||
WORKDIR /steamsalty
|
||||
|
||||
RUN apk update && apk add --no-cache ca-certificates
|
||||
|
||||
COPY . .
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
RUN go build -o /app/steamsalty
|
||||
|
||||
COPY . .
|
||||
ARG TARGETOS TARGETARCH
|
||||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /app/steamsalty
|
||||
|
||||
|
||||
|
||||
|
@ -18,4 +21,4 @@ COPY --from=builder /usr/share/ca-certificates /usr/share/ca-certificates
|
|||
|
||||
COPY --from=builder /app/steamsalty /app/steamsalty
|
||||
|
||||
ENTRYPOINT ["/app/steamsalty"]
|
||||
ENTRYPOINT ["/app/steamsalty"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue