Green-Mod / poky-container

🐳 A Docker image able to run Yocto Project's bitbake command

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🐳 Docker poky-container

πŸŽ‰ Introduction

This repository is used to create a Docker image with all the necessary dependencies to run Yocto Project's bitbake command. Indeed, to be able to build a Yocto image you need a Linux operating system. So, if you are using Mac or Windows without using a dedicated virtual machine, you can use this Docker container to build a Yocto image.

πŸ˜‰ Requirements

  • Docker;
  • About 50 GB of free disk space is required to run the build properly.

πŸ’½ Create the volume

Before you can run the container you need to create a Docker volume where you can store the build result (more info here).

The commands to create a volume on MacOS are the following:

docker volume create --name yocto-volume
docker run -it --rm -v yocto-volume:/workdir busybox chown -R 1000:1000 /workdir

Create and run a samba container

More info here.

First let's create the Samba container, which will allow you to access the files in the volume:

docker create -t -p 445:445 --name samba -v yocto-volume:/workdir crops/samba

Then start it:

docker start samba

MacOS will not let you connect to a locally running Samba share. Therefore, create an alias for 127.0.0.1 of 127.0.0.2:

sudo ifconfig lo0 127.0.0.2 alias up

Since you will always need to have the alias to connect to the Samba container, you could also combine the start of Samba and alias like so:

docker start samba && sudo ifconfig lo0 127.0.0.2 alias up

🀟🏼 Starting the container

docker build -t [CONTAINER-NAME] .
docker run -it -v yocto-volume:/home/dev [CONTAINER-NAME]

Inside the container you can build a Yocto Project image (more info here).

For example you can run the following commands:

git clone git://git.yoctoproject.org/poky
cd poky
git fetch --tags
git checkout tags/yocto-3.4 -b my-yocto-3.4

source oe-init-build-env
# Build a minimal image.
bitbake core-image-minimal

About

🐳 A Docker image able to run Yocto Project's bitbake command


Languages

Language:Dockerfile 100.0%