2026-03-05 16:24:34 +03:00
|
|
|
FROM golang:1.25.7-alpine3.23 AS builder
|
2025-03-29 21:57:32 +03:00
|
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
|
|
|
|
|
|
COPY go.* ./
|
|
|
|
|
|
|
|
|
|
RUN go mod tidy
|
|
|
|
|
|
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o app ./
|
|
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
|
|
RUN mkdir -p /home
|
|
|
|
|
|
|
|
|
|
COPY --from=builder /build/app /home/app
|
|
|
|
|
|
|
|
|
|
CMD ["./home/app"]
|