Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-cmake . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-perl . /
COPY --from=stagex/core-pkgconf . /
COPY --from=stagex/core-samurai . /
COPY --from=stagex/core-openssl . /
COPY --from=stagex/user-libsodium . /
COPY --from=stagex/user-util-linux . /
COPY --from=stagex/user-xmlto . /
COPY --from=fetch . .
RUN tar -xf zeromq-${VERSION}.tar.gz
WORKDIR /zeromq-${VERSION}
RUN --network=none <<-EOF
set -eux
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_TESTS=OFF \
-DBUILD_STATIC=OFF \
-DWITH_LIBSODIUM=ON \
-DENABLE_CURVE=ON \
-DWITH_DOC=OFF
cmake --build build
cmake -B build-static -G Ninja \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/rootfs/usr \
-DBUILD_TESTS=OFF \
-DBUILD_STATIC=ON \
-DBUILD_SHARED=OFF \
-DWITH_LIBSODIUM=ON \
-DWITH_LIBSODIUM_STATIC=ON \
-DENABLE_CURVE=ON \
-DWITH_DOC=OFF
cmake --build build-static
DESTDIR="/rootfs/" cmake --install build
install -Dm644 build-static/lib/*.a -t /rootfs/usr/lib
EOF
# FROM stagex/core-filesystem AS package
FROM scratch AS package
COPY --from=build /rootfs/ /