Building with Docker¶
Officially supported and tested method for building with Docker¶
This method works for building u-boot and kernel packages as well as building full OS images.
To write fresh-builded image directly to sdcard or other block device you have to enable
Docker run in
DOCKER_FLAGS+=(--privileged) in file
userpatches\config-docker.conf or your own docker-config file.
Building additional packages (
EXTERNAL_NEW) is not supported.
- x86/x64/aarch64/armhf Linux host that supports running a recent Docker daemon. Refer to Docker documentation for details.
- Docker version 17.06 CE or newer.
- Enough free disk space on the storage used for Docker containers and named volumes. Named volumes path can be changed using standard Docker utilites, refer to Docker documentation for details.
There are 3 options to start build process:
1. By passing configuration file name (
config-<conf_name>.conf), stored in
userpatches directory, as an argument:
The process creates and runs a named Docker container
armbian with two named volumes
and mounts local directories
Options 1 and 2 compile the same as without Docker but in separate environment to prevent changes to the base system.
The dockerfile of the created container is placed in
userpatches directory, and all container-related options can be changed
userpatches/config-docker.conf file. Templates of both files are located in the
docker-shell interactive mode¶
The docker-shell interactive mode is useful for when you need to do more than just “make an image.” This mode allows you to edit U-Boot and kernel sources before and after applying patches, investigate compilation errors, and so on.
This mode also allows you to manually run individual steps of the build process.
First, start docker-shell on the host build system:
RELEASE=buster BOARD=rockpi-4a BRANCH=edgeare passed into shell and will be set into envirounment variables.
Next, we can simply start building an image:
For example, to compile U-Boot, prepare the environment with: