27 lines
822 B
Docker
27 lines
822 B
Docker
# Image of the demo seed operator command. Only the isolated demo stand
|
|
# overlay (deploy/docker/docker-compose.demo.yml) builds it; the backend and
|
|
# release images never contain the command.
|
|
ARG GO_IMAGE=golang:1.26.8-alpine
|
|
ARG RUNTIME_IMAGE=gcr.io/distroless/static-debian12:nonroot
|
|
|
|
FROM ${GO_IMAGE} AS build
|
|
|
|
ENV GOTOOLCHAIN=local
|
|
|
|
WORKDIR /src/backend
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . ./
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -buildvcs=false -trimpath -ldflags="-s -w" -o /out/demo-seed ./cmd/demo-seed
|
|
|
|
FROM ${RUNTIME_IMAGE}
|
|
|
|
LABEL org.opencontainers.image.title="Lincodex demo seed" \
|
|
org.opencontainers.image.description="Operator command that seeds synthetic data on an isolated demo stand"
|
|
|
|
WORKDIR /
|
|
COPY --from=build /out/demo-seed /demo-seed
|
|
USER nonroot:nonroot
|
|
ENTRYPOINT ["/demo-seed"]
|