stagex/packages/sed/Containerfile

30 lines
728 B
Text
Raw Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-02-09 07:30:28 +00:00
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
2024-08-08 07:47:42 +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
2024-08-08 07:47:42 +00:00
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
2024-02-09 07:30:28 +00:00
RUN tar -xf sed-${VERSION}.tar.xz
2024-08-26 01:18:52 +00:00
WORKDIR /sed-${VERSION}
2024-02-09 07:30:28 +00:00
RUN --network=none <<-EOF
set -eux
./configure \
--prefix=/usr; \
make -j "$(nproc)"
2024-02-09 07:30:28 +00:00
EOF
2023-12-16 23:50:40 +00:00
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-04-11 20:09:20 +00:00
RUN --network=none make DESTDIR=/rootfs install
2023-12-05 04:34:07 +00:00
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /