Files
moby/man/vendor/github.com/cpuguy83/go-md2man/v2/Dockerfile
Cory Snider 05d7008419 man: build dockerd man pages using make
Vendor the go-md2man tool used to generate the man pages so that the
only dependency is a Go toolchain.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2024-08-19 14:01:38 -04:00

15 lines
453 B
Docker

ARG GO_VERSION=1.21
FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS build
COPY . /go/src/github.com/cpuguy83/go-md2man
WORKDIR /go/src/github.com/cpuguy83/go-md2man
ARG TARGETOS TARGETARCH TARGETVARIANT
RUN \
--mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
make build
FROM scratch
COPY --from=build /go/src/github.com/cpuguy83/go-md2man/bin/go-md2man /go-md2man
ENTRYPOINT ["/go-md2man"]