This commit is contained in:
Lance R. Vick 2023-11-18 23:38:16 -08:00
parent 0cd4eee2e8
commit 5e20d16df9
No known key found for this signature in database
GPG key ID: 8E47A1EC35A1551D
6 changed files with 3513 additions and 2 deletions

View file

@ -29,6 +29,9 @@ out/make.oci.tgz: \
out/musl.oci.tgz
docker build -t imgrep/make --output type=oci,dest=$@ packages/make
out/ca-certificates.oci.tgz:
docker build -t imgrep/ca-certificates --output type=oci,dest=$@ packages/ca-certificates
out/bash.oci.tgz: \
out/gcc.oci.tgz
docker build -t imgrep/bash --output type=oci,dest=$@ packages/bash
@ -55,6 +58,16 @@ out/perl.oci.tgz: \
out/musl.oci.tgz
docker build -t imgrep/perl --output type=oci,dest=$@ packages/perl
out/curl.oci.tgz: \
out/gcc.oci.tgz \
out/musl.oci.tgz \
out/busybox.oci.tgz \
out/make.oci.tgz \
out/binutils.oci.tgz \
out/openssl.oci.tgz \
out/ca-certificates.oci.tgz
docker build -t imgrep/curl --output type=oci,dest=$@ packages/curl
out/python.oci.tgz: \
out/gcc.oci.tgz \
out/perl.oci.tgz \

View file

@ -44,7 +44,7 @@ RUN set -ex; \
--with-pic; \
make -j "$(nproc)"; \
make DESTDIR="/rootfs" install;
COPY --from=musl /lib/libc.so /rootfs/lib/ld-musl-x86_64.so.1
COPY --from=musl /usr/lib/libc.so /rootfs/lib/ld-musl-x86_64.so.1
FROM scratch
COPY --from=build /rootfs /

View file

@ -0,0 +1,2 @@
FROM scratch
COPY cacert.pem /etc/ssl/certs/ca-certificates.crt

File diff suppressed because it is too large Load diff

45
packages/curl/Dockerfile Normal file
View file

@ -0,0 +1,45 @@
FROM imgrep/gcc:latest as gcc
FROM imgrep/musl:latest as musl
FROM imgrep/busybox:latest as busybox
FROM imgrep/make:latest as make
FROM imgrep/binutils:latest as binutils
FROM imgrep/openssl:latest as openssl
FROM imgrep/ca-certificates:latest as ca-certificates
FROM busybox as build
ENV SRC_SITE=https://curl.se/download
ENV SRC_VERSION=8.4.0
ENV SRC_HASH=16c62a9c4af0f703d28bda6d7bbf37ba47055ad3414d70dec63e2e6336f2a82d
RUN wget ${SRC_SITE}/curl-${SRC_VERSION}.tar.xz
RUN echo wget ${SRC_SITE}/curl-${SRC_VERSION}.tar.xz
RUN echo "${SRC_HASH} curl-${SRC_VERSION}.tar.xz" | sha256sum -c
RUN tar -xf curl-${SRC_VERSION}.tar.xz
WORKDIR curl-${SRC_VERSION}
COPY --from=binutils . /
COPY --from=make . /
COPY --from=musl . /
COPY --from=gcc . /
COPY --from=openssl . /
RUN set -eux; \
./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 \
--enable-static-link; \
make
RUN make install DESTDIR=/home/user/rootfs
COPY --from=musl . /home/user/rootfs/
COPY --from=openssl . /home/user/rootfs/
COPY --from=ca-certificates . /home/user/rootfs/
FROM scratch
COPY --from=build /home/user/rootfs /
USER 100:100
ENTRYPOINT ["/usr/bin/curl"]
CMD ["--version"]

View file

@ -20,7 +20,7 @@ RUN set -ex; \
--disable-nls; \
make -j "$(nproc)"; \
make DESTDIR="/rootfs" install;
COPY --from=musl /lib/libc.so /rootfs/lib/ld-musl-x86_64.so.1
COPY --from=musl /usr/lib/libc.so /rootfs/lib/ld-musl-x86_64.so.1
FROM scratch
COPY --from=build /rootfs /