That’s cute - though typically the docker images I build need supporting infra around them anyhow - I’d have to forward to the build script.
#!/usr/bin/env -S bash -c "docker run --privileged ..."
FROM docker
RUN <<EOF cat >/other.Dockerfile
#!/usr/bin/env -S bash -c "docker run ..."
FROM debian:buster
EOF
RUN chmod +x /other.Dockerfile
CMD bash -c "/other.Dockerfile &; ./main" -v /:/sysroot