Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-bash . /
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-go . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-linux-headers . /
COPY --from=stagex/core-pkgconf . /
COPY --from=stagex/user-libseccomp . /
COPY --from=stagex/user-go-md2man . /
ADD fetch/runc-${VERSION}.tar.gz .
WORKDIR /runc-${VERSION}
RUN <<-EOF
set -eux
make EXTRA_LDFLAGS="-w -s -buildid=" COMMIT=${VERSION} -j "$(nproc)"
make man
install -Dsm755 runc /rootfs/usr/bin/runc
install -d /rootfs/usr/share/man/man8
install -Dm644 man/man8/* /rootfs/usr/share/man/man8/
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /