kernel-hardening-checker

Source

FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-python . /
COPY --from=stagex/core-zlib . /
COPY --from=stagex/core-py-gpep517 . /
COPY --from=stagex/core-py-installer . /
COPY --from=stagex/core-py-setuptools . /
COPY --from=stagex/core-py-wheel . /
ADD fetch/kernel-hardening-checker-${VERSION}.tar.gz .
WORKDIR /kernel-hardening-checker-${VERSION}
RUN --network=none <<-EOF
	set -eu
	sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')"
	mkdir -p "/rootfs/${sitedir}"
	gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
	python3 -m installer -d "/rootfs" .dist/*.whl
	install -Dm0644 -t "/rootfs/usr/share/man/man1/" man/kernel-hardening-checker.1
	install -Dm0644 -t "/rootfs/usr/share/licenses/kernel-hardening-checker/" LICENSE.txt
	find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /
Copied to clipboard!