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-json-c . /
COPY --from=stagex/user-autoconf-archive . /
COPY --from=stagex/user-util-linux . /
ADD fetch/tpm2-tss-${VERSION}.tar.gz .
WORKDIR /tpm2-tss-${VERSION}
RUN --network=none <<-EOF
set -eux
printf "${VERSION}" > VERSION
cat bootstrap | grep -ve ^git > bootstrap-nogit
sh bootstrap-nogit
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-tctidefaultmodule=device \
--with-tctidefaultconfig=/dev/tpmrm0 \
--with-crypto=ossl
make -j "$(nproc)"
make DESTDIR=/rootfs install
rm -rf /rootfs/var/run
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /