Source

FROM stagex/pallet-cgo AS build
ARG VERSION
ADD fetch/vhs-${VERSION}.tar.gz .
WORKDIR /vhs-${VERSION}
RUN go mod download
RUN --network=none <<-EOF
	go \
		build \
		-trimpath \
		-o vhs \
		-v \
		-ldflags="-s -w" \
		.
	mkdir -p /rootfs/usr/bin/
	install -vDm755 -t /rootfs/usr/bin vhs
	install -vDm644 -t /rootfs/usr/share/licenses/vhs LICENSE
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs /
Copied to clipboard!