Source
FROM scratch AS build
ARG VERSION
ENV SOURCE_DATE_EPOCH=1
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-perl . /
ADD fetch/perl-module-build-${VERSION}.tar.gz .
WORKDIR /Module-Build-${VERSION}
RUN --network=none <<-EOF
set -eux
perl Build.PL installdirs=vendor
perl Build
perl Build install destdir="/rootfs"
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /