This repository has been archived on 2024-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
stagex/make/Dockerfile

30 lines
903 B
Docker
Raw Normal View History

2023-12-10 18:05:50 +00:00
ARG REGISTRY=local
FROM ${REGISTRY}/musl:latest as musl
FROM ${REGISTRY}/bootstrap:latest as build
2023-11-16 10:01:19 +00:00
ENV SRC_SITE https://ftp.gnu.org/gnu/make
ENV SRC_VERSION 4.4
ENV SRC_HASH 581f4d4e872da74b3941c874215898a7d35802f03732bdccee1d4a7979105d18
RUN wget ${SRC_SITE}/make-${SRC_VERSION}.tar.gz
RUN echo "${SRC_HASH} make-${SRC_VERSION}.tar.gz" | sha256sum -c
RUN tar -xf make-${SRC_VERSION}.tar.gz
WORKDIR make-${SRC_VERSION}
RUN set -ex; \
./configure \
--build=x86_64-linux-musl \
--host=x86_64-linux-musl \
--target=x86_64-linux-musl \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--disable-nls; \
make -j "$(nproc)"; \
make DESTDIR="/rootfs" install;
2023-11-19 07:38:16 +00:00
COPY --from=musl /usr/lib/libc.so /rootfs/lib/ld-musl-x86_64.so.1
2023-11-16 10:01:19 +00:00
2023-12-12 17:45:39 +00:00
FROM scratch as package
2023-11-16 10:01:19 +00:00
COPY --from=build /rootfs /
ENTRYPOINT ["/usr/bin/make"]
CMD ["--version"]