Something went wrong. Try again.
A public git mirror
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334# syntax=docker/dockerfile:1
# Base images are pinned by digest. To bump: crane digest <image>:<tag># The build stage runs natively and cross-compiles, so multi-arch builds only# emulate the small runtime stage.FROM --platform=$BUILDPLATFORM golang:1.27.4-alpine3.24@sha256:70bd7ddea8b6cbe5d6943cde279d6b67feb10cc924fb9100d1d8757c1575b280 AS buildWORKDIR /srcCOPY go.mod go.sum ./RUN go mod downloadCOPY cmd ./cmdCOPY internal ./internalCOPY web ./webARG TARGETOS TARGETARCHRUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \ go build -trimpath -ldflags="-s -w" -o /out/showcase ./cmd/showcase
# git is needed at runtime for the mirrors, which is why this isn't distroless.FROM alpine:3.24.4@sha256:f59abe656b692d901e184be3445e084786602108599d2a51d229c0f5a48c71bf# hadolint ignore=DL3018RUN apk add --no-cache git ca-certificates \ && mkdir /data \ && chown 10001:10001 /dataCOPY --from=build /out/showcase /usr/local/bin/showcase# the mirrors are owned by this user, so no safe.directory is neededUSER 10001:10001ENV HOME=/dataEXPOSE 8080VOLUME /data# /healthz is 503 until the first build is publishedHEALTHCHECK --interval=30s --timeout=5s --start-period=5m \ CMD ["wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8080/healthz"]ENTRYPOINT ["/usr/local/bin/showcase"]CMD ["-config", "/config.json", "-data", "/data", "-listen", ":8080"]