Digi Embedded Yocto supports different types of containers that are explained later in Container technologies.
In this guide, you will use public container redis:7-alpine, which is an OCI/Docker Linux container based on Alpine Linux distribution.
This image:
-
uses
musllibc instead ofglibc -
uses BusyBox utilities
-
has a very small footprint
-
uses
apkpackage manager
1. Install and set up the Docker engine
-
Install Docker on your host computer:
$ sudo apt-get install docker.io -
Add your user to the
dockergroup to avoid having to run every Docker command as root.$ sudo usermod -a -G docker "$(whoami)" $ sudo newgrp dockerFor the new group to take effect on a different shell, reboot or log out.
2. Pull the image
-
On your host computer, pull the image
redis:7-alpinefrom DockerHub for your device’s SoC architecture:$ docker pull --platform linux/arm64 docker.io/library/redis:7-alpine -
List Docker images to check the new image appears:
$ docker images i Info → U In Use IMAGE ID DISK USAGE CONTENT SIZE EXTRA redis:7-alpine 80dd823f4d2b 39.5MB 0B
3. Save the image
-
For the purpose of this guide, create a working folder in your home directory:
$ mkdir ~/container-demo -
Save the container image as a tar file.
$ docker save -o ~/container-demo/redis.tar docker.io/library/redis:7-alpine
You can transfer this container to the device and run it with standard docker or podman commands.
However, the next step in the guide packages it into a Digi Container Package (DCP) to take full advantage of Digi containers framework.