It is also possible to build docker images with Bazel and rules_docker, which doesn't require docker itself, and can run unprivileged. That said, it is not compatible with Dockerfile (obviously) but you can do some cool things such as compose layers individually into a final image. 1.