The docker
repo contains the Dockerfile specification of the default image used by
unity
.
The
script
used to build Docker images for unity
builds images for multiple platforms. This uses the
buildx
plugin and so requires QEMU.
Install QEMU:
# Ubuntu example
sudo apt-get install -y qemu-user-static
(taken from an article on using buildx
for multi architecture images).
Install cross-platform emulators for at least the target platforms:
docker run --privileged --rm tonistiigi/binfmt --install all
(taken from the buildx
documentation.)
Create and use a builder (which will by default use the docker-container
driver):
docker buildx create --name mybuilder
docker buildx use mybuilder
Verify the builder is using the docker-container
driver and the target
platforms supported:
docker buildx inspect --bootstrap
The output should be something like:
[+] Building 0.5s (1/1) FINISHED
=> [internal] booting buildkit 0.5s
=> => starting container buildx_buildkit_mybuilder0 0.5s
Name: mybuilder
Driver: docker-container
Nodes:
Name: mybuilder0
Endpoint: unix:///var/run/docker.sock
Status: running
Platforms: linux/arm64, linux/amd64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64
Run the script to build Docker images for unity
:
./_scripts/buildDockerImage.sh -b
Omit the -b
flag to also push the resulting multi-arch images to Docker Hub.