Files
x509-certificate-exporter/build/Dockerfile.seed-hostpath

19 lines
779 B
Docker

# E2E-only image: builds the dev/seed-hostpath binary that materialises
# scenarios.AllHostPath() onto a node's filesystem. Built by Tilt during
# `task test:e2e` and never published. Runs as root because it has to
# write into a hostPath; that hostPath is a dedicated subtree under
# /var/lib/x509ce-e2e/ that lives only inside the throwaway k3d node.
# renovate: datasource=docker depName=golang
FROM golang:1.26.5-alpine@sha256:0178a641fbb4858c5f1b48e34bdaabe0350a330a1b1149aabd498d0699ff5fb2 AS build
WORKDIR /src
ENV CGO_ENABLED=0 GOTOOLCHAIN=auto
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -trimpath -tags netgo,osusergo -o /seed-hostpath ./dev/seed-hostpath
FROM scratch
COPY --from=build /seed-hostpath /seed-hostpath
ENTRYPOINT ["/seed-hostpath"]