stagex/packages/zip/Containerfile

34 lines
907 B
Text
Raw Normal View History

2024-04-10 16:41:17 +00:00
FROM scratch as base
ENV VERSION=30
ENV SRC_HASH=f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369
ENV SRC_FILE=zip${VERSION}.tar.gz
ENV SRC_SITE=https://fossies.org/linux/misc/${SRC_FILE}
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch as build
COPY --from=stagex/binutils . /
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/cmake . /
COPY --from=stagex/musl . /
COPY --from=stagex/make . /
RUN --network=none tar -xf ${SRC_FILE}
WORKDIR zip${VERSION}
2024-04-10 16:45:02 +00:00
ENV SOURCE_DATE_EPOCH=1
2024-04-10 16:41:17 +00:00
RUN --network=none <<-EOF
set -eux
make -f unix/Makefile prefix=/usr generic
EOF
FROM build as install
RUN --network=none <<-EOF
set -eux
mkdir -p /rootfs/usr/bin/
DESTDIR=/rootfs make -f unix/Makefile prefix=/rootfs/usr MANDIR=rootfs/usr/share/man/man1 install
EOF
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /