stagex/packages/perl-dbi/Containerfile

36 lines
956 B
Text
Raw Normal View History

FROM scratch AS base
2024-08-16 19:26:04 +00:00
ARG ARCH=x86_64
ENV VERSION=1.643
ENV SRC_HASH=8a2b993db560a2c373c174ee976a51027dd780ec766ae17620c20393d2e836fa
ENV SRC_FILE=DBI-${VERSION}.tar.gz
ENV SRC_SITE=https://cpan.metacpan.org/authors/id/T/TI/TIMB/${SRC_FILE}
FROM base AS fetch
2024-08-16 19:26:04 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
FROM fetch AS build
2024-08-16 19:26:04 +00:00
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/bash . /
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/perl . /
COPY --from=stagex/make . /
RUN tar -xf ${SRC_FILE}
2024-08-26 01:18:52 +00:00
WORKDIR /DBI-${VERSION}
ENV SOURCE_DATE_EPOCH=1
2024-08-16 19:26:04 +00:00
RUN --network=none <<-EOF
set -eux
perl Makefile.PL
2024-08-16 19:26:04 +00:00
PERL_MM_USE_DEFAULT="1 perl -I. Makefile.PL INSTALLDIRS=vendor"
make -j "$(nproc)"
2024-08-16 19:26:04 +00:00
EOF
FROM build AS install
2024-08-16 19:26:04 +00:00
RUN make DESTDIR=/rootfs install
RUN find /rootfs -exec touch -hcd "@0" "{}" +
FROM stagex/filesystem AS package
2024-08-16 19:26:04 +00:00
COPY --from=install /rootfs/. /