stagex/packages/libcap-ng/Containerfile

39 lines
1,000 B
Text
Raw Normal View History

2024-08-18 23:09:39 +00:00
FROM scratch AS base
ENV VERSION=0.8.5
ENV SRC_HASH=3ba5294d1cbdfa98afaacfbc00b6af9ed2b83e8a21817185dfd844cc8c7ac6ff
ENV SRC_FILE=libcap-ng-${VERSION}.tar.gz
ENV SRC_SITE=http://people.redhat.com/sgrubb/libcap-ng/${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/linux-headers . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
RUN tar -xf ${SRC_FILE}
WORKDIR libcap-ng-${VERSION}
RUN --network=none <<-EOF
set -eux;
./configure \
--build=x86_64-linux-musl \
--host=x86_64-linux-musl \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--without-python \
--without-python3 \
--enable-static
make -j "$(nproc)"
EOF
FROM build AS install
RUN --network=none make DESTDIR=/rootfs install
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /