14 lines
262 B
Docker
14 lines
262 B
Docker
FROM golang:1.24-alpine-3.21 AS builder
|
|
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o app src/main.go
|
|
|
|
FROM gcr.io/distroless/static
|
|
|
|
WORKDIR /
|
|
COPY --from=builder /app/app .
|
|
CMD ["./app"]
|