feat: Add project foundation, documentation, and Docker setup
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
22
backend/Dockerfile.prod
Normal file
22
backend/Dockerfile.prod
Normal file
@@ -0,0 +1,22 @@
|
||||
# Production Dockerfile with pinned image digests
|
||||
# golang:1.25.6-alpine
|
||||
FROM golang@sha256:d9b2e14101f27ec8d09674cd01186798d227bb0daec90e032aeb1cd22ac0f029 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o server ./cmd/server
|
||||
|
||||
# gcr.io/distroless/static-debian12:nonroot
|
||||
FROM gcr.io/distroless/static-debian12@sha256:6dcc833df2a475be1a3d7fc951de90ac91a2cb0be237c7578b88722571f77571
|
||||
|
||||
COPY --from=builder /app/server /server
|
||||
|
||||
USER nonroot:nonroot
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["/server"]
|
||||
Reference in New Issue
Block a user