data layer
This commit is contained in:
12
data-layer/api/Dockerfile
Normal file
12
data-layer/api/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM golang:1.22-alpine AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum* ./
|
||||
RUN go mod download || true
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/api ./cmd/server
|
||||
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
COPY --from=build /out/api /api
|
||||
EXPOSE 4000
|
||||
USER nonroot:nonroot
|
||||
ENTRYPOINT ["/api"]
|
||||
Reference in New Issue
Block a user