SimpleSwitch™ out of docker containers#

By adding

inherit dockerimage
SRC_URI = "docker://<image>;sha256sum=<checksum>"

to every recipe we can download an image from docker hub and reuse it as a SimpleSwitch™ image.

Example#

SRC_URI = "docker://filebrowser/filebrowser;arch=${ARCH};version=v${PV};sha256sum=${CHECKSUM}"

inherit dockerimage

ARCH = "doesnot-exist"
ARCH:sm2s-imx8-all = "arm64"
ARCH:sm2s-intel-all = "amd64"

CHECKSUM = "nochecksum"
CHECKSUM:sm2s-imx8-all = "e5e4444948c3b93cf6c647dee58590f30f76838170470851414a4b271a07ffad"
CHECKSUM:sm2s-intel-all = "4478da6483e6050dbf0c5f6c6b3206b9d9a7984ba8180fc94b83d667fee51815"

will download filebrowser for the correct architecture of your build.

Note

  • ARCH needs to be set for all supported SOMs specifically, check the OS/ARCH tab on the Docker Hub to find the best match.

  • CHECKSUM needs to be set to the SHA256 checksum calculated by the bitbake build system. Best is it to build with a wrong checksum and get the correct one from the build output of bitbake.

Options explained#

Here be dragons

  • Do not use latest tags on images, as they can change at any point in time without further notice.

  • Currently we don’t support the creation of SimpleSwitch™ packages out of private registries.

  • SBOM/licensing of the recipe will inevitably not reflect all of the software used in the container.

  • Installation of multiple dockerimage based recipes in one simpleswitch-docker-package, will likely create conflicts between different files and folders.

  • the implementation will fail if hub.docker.com does not offer an image for Linux and your target architecture.

  • devtool integration does not work with an out of tree fetcher

    • devtool check-upgrade-status can be emulated by running bitbake <recipe> -c do_check_upgrade_status resp. scotty bitbake <recipe> -c do_check_upgrade_status