Initial commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
FROM golang:1.23-alpine AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum* ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
ARG SERVICE=api
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/service ./cmd/${SERVICE}
|
||||
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
COPY --from=build /out/service /service
|
||||
USER nonroot:nonroot
|
||||
ENTRYPOINT ["/service"]
|
||||
Reference in New Issue
Block a user