File: Dockerfile

package info (click to toggle)
go-md2man-v2 2.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 164 kB
  • sloc: makefile: 41
file content (14 lines) | stat: -rw-r--r-- 453 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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"]