stagex/packages/cpio/Containerfile

40 lines
981 B
Text
Raw Normal View History

2024-02-09 07:30:28 +00:00
FROM scratch as base
ENV VERSION=2.15
2024-01-31 11:15:42 +00:00
ENV SRC_HASH=efa50ef983137eefc0a02fdb51509d624b5e3295c980aa127ceee4183455499e
2024-02-09 07:30:28 +00:00
ENV SRC_FILE=cpio-${VERSION}.tar.gz
ENV SRC_SITE=https://ftp.gnu.org/gnu/cpio/${SRC_FILE}
2024-01-31 11:15:42 +00:00
FROM base as fetch
2024-02-09 07:30:28 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-01-31 11:15:42 +00:00
FROM fetch as build
2024-02-09 07:30:28 +00:00
COPY --from=busybox . /
COPY --from=gcc . /
COPY --from=binutils . /
COPY --from=make . /
COPY --from=musl . /
2024-02-13 17:13:17 +00:00
RUN tar -xzf ${SRC_FILE}
WORKDIR cpio-${VERSION}
2024-02-09 07:30:28 +00:00
RUN --network=none <<-EOF
set -eux
2024-01-31 11:15:42 +00:00
./configure \
--build=x86_64-unknown-linux-musl \
--host=x86_64-unknown-linux-musl \
--prefix=/usr \
--bindir=/bin \
--mandir=/usr/share/man \
2024-02-15 12:57:43 +00:00
--infodir=/usr/share/info \
gl_cv_func_getcwd_path_max="no, but it is partly working"
2024-01-31 11:15:42 +00:00
make
2024-02-09 07:30:28 +00:00
EOF
2024-01-31 11:15:42 +00:00
FROM build as install
2024-02-09 07:30:28 +00:00
RUN <<-EOF
set -eux
make DESTDIR=/rootfs install
EOF
RUN find /rootfs -exec touch -hcd "@0" "{}" +
2024-01-31 11:15:42 +00:00
FROM scratch as package
COPY --from=install /rootfs /