feat: add go-md2man
This commit is contained in:
parent
c3bedd1556
commit
8f25de7ff5
2 changed files with 46 additions and 0 deletions
36
packages/go-md2man/Containerfile
Normal file
36
packages/go-md2man/Containerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=2.0.3
|
||||
ENV SRC_HASH=7ca3a04bb4ab83387538235decc42a535097a05d2fb9f2266d0c47b33119501f
|
||||
ENV SRC_FILE=v${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/cpuguy83/go-md2man/archive/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/go . /
|
||||
COPY --from=stagex/ca-certificates . /
|
||||
RUN tar -xvf ${SRC_FILE}
|
||||
WORKDIR go-md2man-${VERSION}
|
||||
ENV PWD=/home/user/go-md2man-${VERSION}
|
||||
ENV GOPATH=${PWD}/cache/go
|
||||
ENV GOCACHE=${PWD}/cache/
|
||||
ENV GOWORK=off
|
||||
ENV GOPROXY=https://proxy.golang.org,direct
|
||||
ENV GOSUMDB=sum.golang.org
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOHOSTOS=linux
|
||||
ENV GOHOSTARCH=amd64
|
||||
RUN mkdir -p ${GOPATH}
|
||||
RUN go build -o bin/go-md2man
|
||||
|
||||
from build as install
|
||||
RUN <<-EOF
|
||||
mkdir -p /rootfs/usr/bin/
|
||||
cp bin/go-md2man /rootfs/usr/bin/
|
||||
find /rootfs -exec touch -hcd "@0" "{}" +
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/./ /
|
|
@ -504,6 +504,16 @@ out/go/index.json: \
|
|||
out/musl/index.json
|
||||
$(call build,go)
|
||||
|
||||
.PHONY: go-md2man
|
||||
go-md2man: out/go-md2man/index.json
|
||||
out/go-md2man/index.json: \
|
||||
packages/go-md2man/Containerfile \
|
||||
out/busybox/index.json \
|
||||
out/ca-certificates/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/go/index.json
|
||||
$(call build,go-md2man)
|
||||
|
||||
.PHONY: gperf
|
||||
gperf: out/gperf/index.json
|
||||
out/gperf/index.json: \
|
||||
|
|
Loading…
Reference in a new issue