Running Docker on an i.MX8

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Running Docker on an i.MX8

6,309 Views
russell_coy
Contributor II

Hello,

I am trying to create an image for the imx8mqevk using Yocto with docker added.

I am using the NXP i.MX Release Distro 4.9.51-mx8-ga (morty), kernel version 4.9.51-imx_4.9.51_imx8m_ga+g6df7474.

So I have git cloned the meta-virtualization layer (morty branch) to my Yocto top level, added the layer reference into my build/bblayers.conf file and added docker to my custom image bb file. I've also added DISTRO_FEATURES_append = " virtualization" to my build/local.conf file as suggested by the OE/meta-virtualization 'about' section.

Bitbake of my image completes OK and the docker daemon starts on the target imx8mqevek when booted with the new image. However, if I try to run the docker hello-world test, it appears to pull the image, but the daemon fails to run it, e.g. I get the following:

root:/# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
3b4173355427: Pulling fs layer
3b4173355427: Verifying Checksum
3b4173355427: Download complete
3b4173355427: Pull complete
Digest: sha256:2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535
Status: Downloaded newer image for hello-world:latest
docker: Error response from daemon: operation not supported.
See 'docker run --help'

Any idea what I'm doing wrong here, any additional packages required, or has anybody else had similar issues when trying to add docker using the NXP Yocto method?

Kind regards,

Russell

2 Replies

4,815 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Unfortunately, we cannot support Yocto layers that are not officially in our BSPs. We do have some documents that explain the process of adding a new layer to the Yocto image, Yocto Training - HOME. However, given the complexity of what you are trying to make. I recommend you to go with NXP professional support, they could help you with this.

NXP Professional Services | NXP.

Furthermore, I found this that could help you.

TipsAndTricks/DockerOnImage - Yocto Project 

Best regards,

Diego.

0 Kudos

4,815 Views
russell_coy
Contributor II

Hi Diego,

Thanks for the suggestions. I tried the TipsAndTricks/DockerOnImage suggestions, but I still could not get Docker to actually run a container. It will pull an image, but not create and run the container.

I've been in contact with the meta-virtualization team, who suggested trying to build a basic image with Docker for QEMU first to see if it runs there, but I cannot get bitbake to build for QEMU. I have read some posts that suggest that QEMU does not support the i.MX8. I may try just from a Yocto/poky install, rather than through the NXP BSP installation.

I've also tried to make changes to the core configuration to add missing values, but running menuconfig does not work for me. The config window appears to open and then immediately close, with a bitbake success message.

I've also tried using later branches of meta-virtualisation (e.g. thud) rather than morty, but these do not build at all, probably due to the mismatch with the rest of the toolset.

Kind regards,

Russell

0 Kudos