I wrote an (unreleased) Bash-based framework for Docker container- and exo-Docker VM-based LFS builds.
Dir listing: https://pastebin.com/JrPkftgr
Dockerfile (it's still missing throwing away intermediate layers b/c it's optimized for caching and dev speed):
FROM quay.io/centos/centos:stream9
COPY files/bashrc /root/.bashrc
COPY files/bash_profile /root/.bash_profile
COPY --chmod=755 files/sysdiff /usr/bin/sysdiff
WORKDIR /mnt/lfs
COPY files/functions.inc files/
COPY --chmod=755 files/run files/
COPY scripts/0000-install-deps scripts/
RUN files/run install 0000-install-deps
# Docker host runs a memcache instance to cache build artifacts in RAM
COPY scripts/0010-install-sccache scripts/
COPY files/sccache-wrapper.c files/
RUN files/run install 0010-install-sccache
COPY scripts/1000-setup scripts/
COPY files/hosts files/passwd files/group files/shells files/inputrc files/fstab.in files/locale.conf.in files/
RUN files/run install 1000-setup
...