Source
FROM stagex/pallet-gcc-gnu-busybox as build
ARG VERSION
COPY --from=stagex/core-openssl . /
COPY --from=stagex/core-curl . /
COPY --from=stagex/user-tpm2-tss . /
COPY --from=stagex/user-autoconf-archive . /
COPY --from=stagex/user-util-linux . /
ADD fetch/tpm2-tools-${VERSION}.tar.gz .
WORKDIR /tpm2-tools-${VERSION}
RUN --network=none <<-EOF
set -eux
printf "${VERSION}" > VERSION
cat bootstrap | grep -ve ^git > bootstrap-nogit
sh bootstrap-nogit
./configure --prefix=/usr
make -j "$(nproc)"
make DESTDIR=/rootfs install
rm -rf /rootfs/var/run
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /