All checks were successful
release-tag / release-image (push) Successful in 6m31s
17 lines
495 B
Docker
17 lines
495 B
Docker
FROM golang:1.26-alpine AS build
|
|
WORKDIR /src
|
|
COPY go.mod ./
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go test ./... && \
|
|
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/license-platform ./cmd/server && \
|
|
mkdir -p /out/data
|
|
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
WORKDIR /app
|
|
COPY --from=build /out/license-platform /app/license-platform
|
|
COPY --from=build --chown=nonroot:nonroot /out/data /data
|
|
VOLUME ["/data"]
|
|
EXPOSE 8090
|
|
USER nonroot:nonroot
|
|
ENTRYPOINT ["/app/license-platform"]
|