stagex/packages/perl-module-build/Containerfile
2024-08-08 09:47:42 +02:00

29 lines
798 B
Docker

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/. /