2024-02-09 07:30:28 +00:00
|
|
|
FROM scratch as base
|
|
|
|
ENV VERSION=8.4.0
|
2023-11-19 07:38:16 +00:00
|
|
|
ENV SRC_HASH=16c62a9c4af0f703d28bda6d7bbf37ba47055ad3414d70dec63e2e6336f2a82d
|
2024-02-09 07:30:28 +00:00
|
|
|
ENV SRC_FILE=curl-${VERSION}.tar.xz
|
|
|
|
ENV SRC_SITE=https://curl.se/download/${SRC_FILE}
|
2023-11-19 07:38:16 +00:00
|
|
|
|
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/binutils . /
|
|
|
|
COPY --from=stagex/make . /
|
|
|
|
COPY --from=stagex/musl . /
|
|
|
|
COPY --from=stagex/gcc . /
|
|
|
|
COPY --from=stagex/openssl . /
|
2024-02-09 07:30:28 +00:00
|
|
|
RUN tar -xf curl-${VERSION}.tar.xz
|
|
|
|
WORKDIR curl-${VERSION}
|
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
2023-11-19 07:38:16 +00:00
|
|
|
./configure \
|
|
|
|
--build=x86_64-linux-musl \
|
|
|
|
--host=x86_64-linux-musl \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
|
|
|
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
|
|
|
|
--with-openssl \
|
2024-02-09 07:30:28 +00:00
|
|
|
--enable-static-link
|
2024-03-14 07:16:26 +00:00
|
|
|
make -j "$(nproc)"
|
2024-02-09 07:30:28 +00:00
|
|
|
EOF
|
2023-12-16 23:50:40 +00:00
|
|
|
|
|
|
|
FROM build as install
|
2024-02-09 18:19:36 +00:00
|
|
|
RUN make install DESTDIR=/rootfs
|
|
|
|
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
2023-11-19 07:38:16 +00:00
|
|
|
|
2024-03-01 18:30:23 +00:00
|
|
|
FROM stagex/filesystem as package
|
|
|
|
COPY --from=install /rootfs/. /
|