stagex/packages/bash/Containerfile

40 lines
964 B
Text
Raw Normal View History

2024-02-09 07:30:28 +00:00
FROM scratch as base
2024-02-10 23:55:51 +00:00
ENV VERSION=5.2.21
2023-12-12 17:45:39 +00:00
ENV SRC_HASH=c8e31bdc59b69aaffc5b36509905ba3e5cbb12747091d27b4b977f078560d5b8
2024-02-10 23:55:51 +00:00
ENV SRC_FILE=bash-${VERSION}.tar.gz
2024-02-09 07:30:28 +00:00
ENV SRC_SITE=https://ftp.gnu.org/gnu/bash/${SRC_FILE}
2023-12-12 17:45:39 +00:00
FROM base as fetch
2024-02-09 07:30:28 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2023-12-12 17:45:39 +00:00
2024-02-10 23:55:51 +00:00
FROM fetch as build
COPY --from=stagex/busybox . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
2023-12-12 17:45:39 +00:00
RUN tar -xzf ${SRC_FILE}
2024-02-10 23:55:51 +00:00
WORKDIR bash-${VERSION}
2024-02-09 07:30:28 +00:00
RUN --network=none <<-EOF
set -eux
./configure \
--build=x86_64-unknown-linux-musl \
--host=x86_64-unknown-linux-musl \
--prefix=/usr \
--bindir=/bin \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--disable-nls \
--enable-readline \
--without-curses \
--without-bash-malloc
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-11-09 10:13:20 +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 /