17 lines
256 B
Docker
17 lines
256 B
Docker
FROM golang:1.25.5-alpine3.23 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o app .
|
|
|
|
FROM alpine:3.23
|
|
|
|
WORKDIR /root/
|
|
COPY --from=builder /app/app .
|
|
CMD ["./app"]
|
|
|