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 musl libc instead of glibc

  • uses BusyBox utilities

  • has a very small footprint

  • uses apk package manager

1. Install and set up the Docker engine

  1. Install Docker on your host computer:

    $ sudo apt-get install docker.io
  2. Add your user to the docker group to avoid having to run every Docker command as root.

    $ sudo usermod -a -G docker "$(whoami)"
    $ sudo newgrp docker
    For the new group to take effect on a different shell, reboot or log out.

2. Pull the image

  1. On your host computer, pull the image redis:7-alpine from DockerHub for your device’s SoC architecture:

    $ docker pull --platform linux/arm64 docker.io/library/redis:7-alpine
  2. 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

  1. For the purpose of this guide, create a working folder in your home directory:

    $ mkdir ~/container-demo
  2. 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.