1-3 Docker
Since our Yocto 3.1 project must be build under a Ubuntu 20.04 environment,
we are about to prepare a docker image that meet the requirement.
The Linux Start-up Guide is the main document we will follow,
RZ/G2L EVK - Linux Start-up Guide
Docker is a software platform that allows you to build, test, and deploy applications quickly. Docker packages software into standardized units called containers that have everything the software needs to run including libraries, system tools, code, and runtime.
Please follow the guide below to build a docker image.
Please select Dockerfile "rzg_ubuntu-20.04" as the dockerfile for building.
After your build, check the images and containers as below,
docker images
docker ps -a
In the following tutorial, suppose we already have an container named my_container_for_20.04, and the shared folder between the container and the outside Ubuntu 22.04 is
~/yocto
The data inside the folder can also be read by the outside world,
So, the subseququent operations we'll build Yocto project
in the container, then exit the container to write
the result image to SD card.
Please take some more time to learn Docker
commands for the maintainence of Docker images and containers
The Docker commands that are often used:
docker info
docker images
docker ps ( only running container)
docker ps -a ( all )
docker start my_container_for_20.04
docker exec -it my_container_for_20.04 /bin/bash
docker rm <container> # remove a container, stop it first
docker rmi <image> # remove a image