13 lines
403 B
Docker
13 lines
403 B
Docker
|
|
FROM golang:1.25-alpine AS builder
|
||
|
|
WORKDIR /app
|
||
|
|
# Dependencies are vendored — build fully offline (proxy.golang.org is geo-blocked from some regions)
|
||
|
|
COPY . .
|
||
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -ldflags="-s -w" -o render-svc ./cmd/server
|
||
|
|
|
||
|
|
FROM alpine:3.20
|
||
|
|
RUN apk add --no-cache ca-certificates tzdata
|
||
|
|
WORKDIR /app
|
||
|
|
COPY --from=builder /app/render-svc .
|
||
|
|
EXPOSE 8080
|
||
|
|
CMD ["./render-svc"]
|