stagex/packages/findutils/Containerfile

39 lines
990 B
Text
Raw Normal View History

2024-02-14 18:36:15 +00:00
FROM scratch as base
ARG ARCH=x86_64
ENV VERSION=4.9.0
ENV SRC_HASH=a2bfb8c09d436770edc59f50fa483e785b161a3b7b9d547573cb08065fd462fe
ENV SRC_FILE=findutils-${VERSION}.tar.xz
ENV SRC_SITE=https://ftp.gnu.org/gnu/findutils/${SRC_FILE}
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch as build
COPY --from=busybox . /
COPY --from=binutils . /
COPY --from=musl . /
COPY --from=make . /
COPY --from=gcc . /
RUN tar -xf ${SRC_FILE}
WORKDIR findutils-${VERSION}
RUN --network=none <<-EOF
set -ex
./configure \
--build=${ARCH}-linux-musl \
--host=${ARCH}-linux-musl \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/share/man \
2024-02-15 04:18:51 +00:00
--infodir=/usr/share/info \
gl_cv_func_getcwd_path_max="no, but it is partly working"
2024-02-14 18:36:15 +00:00
make -j "$(nproc)"
EOF
FROM build as install
RUN --network=none make DESTDIR="/rootfs" install
RUN find /rootfs -exec touch -hcd "@0" "{}" +
FROM scratch as package
COPY --from=install /rootfs /