Running Ubuntu ARM64 with Docker
Hi there! Here is a basic guide and easy way to run Ubuntu ARM64 or any Docker container in different architectures.
The only requirement is to have Docker installed. Because I run Linux (Ubuntu), I prefer to install it with the docker snap. If you have it already, you can skip this section.
To install it:
1 sudo snap install docker
Set up Docker group:
1 2 3 4 5 sudo addgroup --system docker sudo adduser $USER docker newgrp docker sudo snap disable docker sudo snap enable docker
Running images from different architectures
By default, you can’t run images that are not for your host architecture on Docker:
However, it is possible to set up Docker to use QEMU, an emulator to run these images, and there is an easy way to do it.
1 docker run --privileged --rm tonistiigi/binfmt --install all
This simple container will configure your host for you, automatically setting up Qemu for Docker. For more details, you can check their GitHub repo.
And we are done! In this case, I am running an Ubuntu image for ARM64:
1 docker run -it --rm --platform linux/arm64 arm64v8/ubuntu sh