yocto in docker
Go to file
Bensuperpc 878dc73192
Fix Makefile with start rule and update README
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2023-02-09 00:15:42 +01:00
bitbake@195750f2ca Add files 2023-02-05 00:50:57 +01:00
builds Add files 2023-02-05 00:50:57 +01:00
layers Update submodule 2023-02-08 13:37:03 +01:00
openembedded-core@2f9c297528 Update submodule 2023-02-08 13:36:41 +01:00
poky@d49d6fe004 Update submodule 2023-02-08 13:36:41 +01:00
.dockerignore Add Makefile and Dockerfile 2023-02-05 01:24:45 +01:00
.gitignore Fix locales 2023-02-05 12:35:48 +01:00
.gitmodules Update submodule 2023-02-08 13:36:41 +01:00
Dockerfile Update Yocto 2023-02-06 20:18:15 +01:00
Makefile Fix Makefile with start rule and update README 2023-02-09 00:15:42 +01:00
readme.md Fix Makefile with start rule and update README 2023-02-09 00:15:42 +01:00



Yocto in docker

You can build images with yocto in docker.


  • Build image in docker with yocto, no need to install yocto (and all dependencies) on your host
  • Multiple layers (In submodules)
  • Easy to use (Makefile)


Software requirements

Software Minimum Recommended
Linux Any Any
Docker 19.x 20.x
Make 4.x 4.x
Time x hours x hours

Hardware requirements

Hardware Minimum Recommended
CPU 2 cores 8 cores
GPU - -
Disk space HDD 50 GB SSD 300 GB
Internet 10 Mbps 100 Mbps

Tested on

With this configuration, you can build a core-image-full-cmdline for intel-corei7-64 in 1h30-2h00.

  • AMD Ryzen 7 5800H (8 cores/16 threads at 3.2 GHz/4.4 GHz)
  • 32 GB RAM
  • 1 TB SSD NVMe Samsung 980 Pro
  • 100 Mbps internet
  • Manjaro Linux
  • Yocto 4.2 beta (02/2023)

How to use docker-yocto

Clone this repository

git clone --recurse-submodules --remote-submodules https://github.com/bensuperpc/docker-yocto.git

Checkout the branch you want (For each submodules/layers). All branches must be the same version on poky/openembedded-core and other submodules/layers.

git branch -a # show all branches on submodules/layers or poky/openembedded-core
git checkout -t origin/langdale -b my-langdale # checkout the branch and create a new branch

Build with docker

make build

Start the container

Now you can start the container, it will mount the current directory in the container.

make start

Build with yocto

Now you are in the container, you can build image with yocto. Initialize the Build Environment, it will create a build directory.

With openembedded-core :

source openembedded-core/oe-init-build-env build_x86_64 

Or with poky (Not for production) :

source poky/oe-init-build-env build_x86_64 

Add meta-intel layer :

bitbake-layers add-layer ../../meta-intel

Show layers if you want :

bitbake-layers show-layers

Change the MACHINE in conf/local.conf :

MACHINE = "intel-corei7-64"

Now you can build the image :

bitbake core-image-full-cmdline

Now you can exit the container when the build is finished.


All the build is in the "builds" directory.

Update submodules and base debian image

make update