Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-perl . /
COPY --from=stagex/core-linux-headers . /
ADD fetch/openssl-${VERSION}.tar.gz .
WORKDIR /openssl-${VERSION}
ENV SOURCE_DATE_EPOCH=1
RUN --network=none <<-EOF
set -eux
CC='gcc -fPIE -pie'
ARCH="$(uname -m)"
perl ./Configure \
--prefix=/usr \
--libdir=lib \
--openssldir=/etc/ssl \
threads \
enable-ktls \
shared \
no-zlib \
no-async \
no-comp \
no-idea \
no-mdc2 \
no-rc5 \
no-ec2m \
no-ssl3 \
no-seed \
no-weak-ssl-ciphers \
linux-${ARCH}
make -j "$(nproc)"
make DESTDIR=/rootfs install
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /