2024-08-08 07:47:42 +00:00
|
|
|
FROM scratch AS base
|
2024-08-01 13:52:58 +00:00
|
|
|
ENV VERSION=8.9.1
|
|
|
|
ENV SRC_HASH=f292f6cc051d5bbabf725ef85d432dfeacc8711dd717ea97612ae590643801e5
|
2024-02-09 07:30:28 +00:00
|
|
|
ENV SRC_FILE=curl-${VERSION}.tar.xz
|
|
|
|
ENV SRC_SITE=https://curl.se/download/${SRC_FILE}
|
2024-08-12 21:24:46 +00:00
|
|
|
ENV SOURCE_DATE_EPOCH=1
|
2023-11-19 07:38:16 +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
|
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-08-01 13:52:58 +00:00
|
|
|
COPY --from=stagex/perl . /
|
2024-05-20 14:06:29 +00:00
|
|
|
COPY --from=stagex/ca-certificates . /
|
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
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM build AS install
|
2024-04-11 20:09:20 +00:00
|
|
|
RUN --network=none make install DESTDIR=/rootfs
|
2023-11-19 07:38:16 +00:00
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM stagex/filesystem AS package
|
2024-03-01 18:30:23 +00:00
|
|
|
COPY --from=install /rootfs/. /
|