Files
tp/serv_golang_rest_api/Dockerfile
T
valitovgaziz 12c855cacc modified: Dockerfile
new file:   src/models/user.go
add structure for serv_golang_rest_api service
2025-09-27 01:38:50 +05:00

14 lines
297 B
Docker

# Build stage
FROM golang:1.25.1-alpine as builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /go/bin/app
# Final stage
FROM gcr.io/distroless/static-debian12
WORKDIR /
COPY --from=builder /go/bin/app /app
CMD ["/app"]
EXPOSE 8080