stagex/packages/sed/Containerfile

31 lines
694 B
Text
Raw Normal View History

2024-02-09 07:30:28 +00:00
FROM scratch as base
ENV VERSION=4.9
2023-12-05 04:34:07 +00:00
ENV SRC_HASH=6e226b732e1cd739464ad6862bd1a1aba42d7982922da7a53519631d24975181
2024-02-09 07:30:28 +00:00
ENV SRC_FILE=sed-${VERSION}.tar.xz
ENV SRC_SITE=https://ftp.gnu.org/gnu/sed/${SRC_FILE}
2023-12-16 23:50:40 +00:00
FROM base as fetch
2024-02-09 07:30:28 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2023-12-16 23:50:40 +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 . /
RUN tar -xf sed-${VERSION}.tar.xz
WORKDIR sed-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--prefix=/; \
make
EOF
2023-12-16 23:50:40 +00:00
FROM build as install
RUN make DESTDIR=/rootfs install
RUN find /rootfs -exec touch -hcd "@0" "{}" +
2023-12-05 04:34:07 +00:00
2023-12-12 17:45:39 +00:00
FROM scratch as package
2023-12-16 23:50:40 +00:00
COPY --from=install /rootfs /