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-15 15:22:38 +00:00
|
|
|
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
|
|
|
|
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
|
2024-02-09 18:19:36 +00:00
|
|
|
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 /
|