For easily build your image we have created a docker image. The only thing you need to install is docker and docker-compose. You have the possibility to build the docker image yourself or download the image from docker hub. The prebuilt docker images are available for the following architectures:
Here you find the image on the docker-hub:
We will provide two different tags:
amd64 --> for cross compiling on amd64
arm64 --> for native compiling or cross compiling on arm64
Docker and docker-compose are for following operating systems available:
You will find how to install docker and docker-compose for your operating system here:
https://docs.docker.com/get-docker/
The official instruction for installing docker-compose on arm devices isnt working sometimes.
You can follow this guide for the installation: https://dev.to/rohansawant/installing-docker-and-docker-compose-on-the-raspberry-pi-in-5-simple-steps-3mgl
If you got some problems at using for compiling the image or the docker container you should install the following on your host system:
sudo apt install qemu-user-static binfmt-support #debian/ubuntu
sudo pacman -S qemu-arch-extra #arch(aur must be maybe enabled)
if there are still problems run the follwing command:
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
git clone https://github.com/ptr1337/arm-img-builder-docker
or create the docker-compose.yml:
version: '3.6'
services:
arm-img-builder:
# build: . #uncomment for building
image: pttrr/arm-img-builder:amd64 #crosscompiling on x64
# image: pttrr/arm-img-builder:arm64 #native or crosscompiling on a arm64
privileged: true
container_name: arm-img-builder
stdin_open: true
tty: true
# restart: always
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /dev:/dev
- ./:/images
:amd64 is for cross compiling on x86_64 Machine :arm64 for compiling on a arm64 machine
docker-compose pull && docker-compose up -d
If your container is successfully started you have to exec into it:
docker exec -it arm-img-builder bash
We also created a "docker-helper" which is aimed for guys which not using docker that often or never used it. Just check this link:
https://wiki.arm-image-builder.xyz/en/docker-addon
Just run in the /build dir following commands (mostly they should do the commands if enterying the container but for going sure):
make update # Updating scripts and the makefile
Then enter in your wanted builder directory and follow the commands which you will find here:
raspberry-image-builder debian-image-builder
When your image built, you just have to move your to the /image directory, for example:
mv *.img.xz /images
Then you will find the image where you started the docker-compose.
For clearing up your directory and built cache in the container you can use the following commands:
make cleanup
make purge
make purge-all
docker stop arm-img-builder
docker system prune -a --volumes
For more information watch at our Wiki or GitHub.
Should you come across any bugs, feel free to either open an issue on GitHub or talk with us directly by joining our channel on Freenode; #debianarm-port