Source

FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-linux-headers . /
COPY --from=stagex/core-llvm . /
COPY --from=stagex/core-mold . /
COPY --from=stagex/core-zlib . /
COPY --from=stagex/core-libzstd . /
ADD fetch/gc-${VERSION}.tar.gz .
WORKDIR /gc-${VERSION}
RUN --network=none <<-EOF
	set -ex
	./configure \
		--prefix=/usr \
		--enable-static
	make -j "$(nproc)"
	make DESTDIR="/rootfs" install
	install -Dm644 -t /rootfs/usr/share/licenses/gc/ README.md
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /
Copied to clipboard!