Docker allows one to build on a specific version of an operating system without having that version installed on the host. This example was tested on Debian Bullseye, but the build was actually done on the Ubuntu Bionic Docker image. The following docker related packages were installed: ii docker-ce 5:20.10.14~3-0~debian-bullseye amd64 Docker: the open-source application container engine ii docker-ce-cli 5:20.10.14~3-0~debian-bullseye amd64 Docker CLI: the open-source application container engine ii docker-ce-rootless-extras 5:20.10.14~3-0~debian-bullseye amd64 Rootless support for Docker. ii docker-scan-plugin 0.17.0~debian-bullseye amd64 Docker scan cli plugin. build-docker.sh was run from the command line to create the docker container called mlinux-build The build starts sshd, but is is not needed if you use the docker exec command to attach to the Docker image as us done in build-mlinux.sh. After the build is complete you should have a login shell. You could the do: su -l mlbuilder build-mlinux.sh After the build completes, the output files can be copied from the host as follows: docker cp mlinux-build:/home/mlbuilder/mlinux-6.0.0/build/tmp/deploy/images/mtcdt/mlinux-base-image-mtcdt-upgrade-withboot.bin .