stagex/packages/perl-module-build/Containerfile

30 lines
798 B
Text
Raw Normal View History

FROM scratch as base
ENV VERSION=0.4234
ENV SRC_HASH=66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f
ENV SRC_FILE=Module-Build-${VERSION}.tar.gz
ENV SRC_SITE=https://search.cpan.org/CPAN/authors/id/L/LE/LEONT/${SRC_FILE}
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch as build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/perl . /
RUN tar -xf ${SRC_FILE}
WORKDIR Module-Build-${VERSION}
RUN --network=none <<-EOF
set -eux
perl Build.PL installdirs=vendor
perl Build
EOF
FROM build as install
RUN --network=none perl Build install destdir="/rootfs"
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /