From: Tim Orling <ticotimo@gmail.com>
To: meta-virtualization@lists.yoctoproject.org
Subject: [PATCH v2 00/13] Container Improvements
Date: Mon, 6 Jul 2026 10:12:35 -0700 [thread overview]
Message-ID: <cover.1783356922.git.tim.orling@konsulko.com> (raw)
In-Reply-To: <cover.1780104071.git.tim.orling@konsulko.com>
This series:
* Sets OCI_IMAGE_RUNTIME_UID with ??= weak assignment in
image-oci to allow container-nonroot-user to set a different
default
* Adds a class to create/run containers with a non-root user
* Adds a class to create non-volatile var log and tmp directories
* Adds a class to enable 'dev' mode where the container starts as
the root user
* Adds new containers:
- app-container-python
- app-containter-mosquitto
- app-container-valkey
- app-container-nginx
* Modifies app-container-curl to be more like the upstream
experience (and more like the above containers)
* Allows mosquitto and libwebsockets to be parsed for
vcontainer distro so we can build multiarch containers
for app-container-mosquitto.
* Allows meta-webserver/recipes-httpd/nginx to be parsed for
vcontainer distro so we can build multiarch containers
for app-container-nginx.
* Adds a fix for buildbot-venv shadowing for environment-setup-ci
script
The resulting containers were tested with simple command line
usage compared to Docker provided equivalents to ensure the
same expected behavior.
Changes in v2:
There were a fair number of changes in v2 in reponse to review
comments and observations during testing.
* image-oci.bbclass:
- set OCI_IMAGE_RUNTIME_UID with ??= to allow other classes
to override
* container-nonroot-user.bbclass:
- set EXTRA_USERS_PARAMS with +=
- added comments to clarify the PYEOF Python heredoc behavior
- added logic to detect $image_name/index.json and fail if not
found
* container-volatile-fixup.bbclass: avoid repeating the same
rootfs postfunc by adding a helper class
* container-dev-mode.bbclass: avoid repeating the same logic
to run container as root user in '-dev' mode
* app-container-python (and other container image recipes):
- drop now redundant IMAGE_INSTALL lines
- simplify by inheriting container-volatile-fixup
- inherit container-dev-mode
* app-container-mosquitto:
- verify '-dev' mode switches from root user to mosquitto user
- verify "production" mode runs as 'nonroot' user
- fix bbmask to allow mosquitto and required libwebsockets
* app-container-valkey:
- added tini and container-entrypoint.sh, like upstream containers
* app-container-nginx:
- fixup 'nonroot' user ownership of NONROOT_OWNED_DIRS
- fix bbmask to allow nginx (but not other recipes-httpd)
* fix for older distro hosts where the 'websockets' Python library is
not new enough (>10.0) and on the AutoBuilder needs to use 'buildtools'.
The PATH in environment-setup-ci now plays properly with such a set up
by no longer added /usr/bin and /bin before existing $PATH.
Successful build https://autobuilder.yoctoproject.org/valkyrie/#/builders/117/builds/25
Tim Orling (13):
image-oci: set OCI_IMAGE_RUNTIME_UID with ??=
classes: add container-nonroot-user.bbclass
classes: add container-volatile-fixup.bbclass
classes: add container-dev-mode.bbclass
recipes-containers/images: add app-container-python
recipes-containers/images: add app-container-mosquitto
vcontainer-bbmask.inc: allow 'mosquitto', 'libwebsockets'
recipes-containers/images: add app-container-valkey
recipes-containers/images: add app-container-nginx
vcontainer-bbmask.inc: allow meta-webserver/recipes-httpd/nginx
app-container-curl: use multilayer mode; container-nonroot-user
container-image-multiarch: add helper recipe
vcontainer-tarball: fix buildbot-venv shadowing
classes/container-dev-mode.bbclass | 34 ++++
classes/container-nonroot-user.bbclass | 155 ++++++++++++++++++
classes/container-volatile-fixup.bbclass | 6 +
classes/image-oci.bbclass | 3 +-
conf/distro/include/vcontainer-bbmask.inc | 6 +-
conf/layer.conf | 1 +
.../images/app-container-curl.bb | 39 +++++
.../images/app-container-mosquitto.bb | 43 +++++
.../images/app-container-nginx.bb | 62 +++++++
.../images/app-container-python.bb | 45 +++++
.../images/app-container-valkey.bb | 71 ++++++++
.../container-entrypoint.sh | 18 ++
.../images/container-image-multiarch.bb | 31 ++++
.../vcontainer/vcontainer-tarball.bb | 4 +-
recipes-demo/images/app-container-curl.bb | 46 ------
15 files changed, 512 insertions(+), 52 deletions(-)
create mode 100644 classes/container-dev-mode.bbclass
create mode 100644 classes/container-nonroot-user.bbclass
create mode 100644 classes/container-volatile-fixup.bbclass
create mode 100644 recipes-containers/images/app-container-curl.bb
create mode 100644 recipes-containers/images/app-container-mosquitto.bb
create mode 100644 recipes-containers/images/app-container-nginx.bb
create mode 100644 recipes-containers/images/app-container-python.bb
create mode 100644 recipes-containers/images/app-container-valkey.bb
create mode 100644 recipes-containers/images/app-container-valkey/container-entrypoint.sh
create mode 100644 recipes-containers/images/container-image-multiarch.bb
delete mode 100644 recipes-demo/images/app-container-curl.bb
This series can be found at
https://github.com/moto-timo/meta-virtualization/tree/container-improvements-v2
--
2.54.0
next prev parent reply other threads:[~2026-07-06 17:13 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 1:31 [meta-virtualization][PATCH 0/7] Container improvements Tim Orling
2026-05-30 1:31 ` [meta-virtualization][PATCH 1/7] classes: add container-nonroot-user.bbclass Tim Orling
2026-05-30 1:31 ` [meta-virtualization][PATCH 2/7] recipes-containers/images: add app-container-python Tim Orling
2026-06-02 10:01 ` Paul Barker
2026-06-02 12:02 ` Bruce Ashfield
2026-05-30 1:31 ` [meta-virtualization][PATCH 3/7] recipes-containers/images: add app-container-mosquitto Tim Orling
2026-05-30 1:31 ` [meta-virtualization][PATCH 4/7] recipes-containers/images: add app-container-valkey Tim Orling
2026-05-30 1:31 ` [meta-virtualization][PATCH 5/7] recipes-containers/images: add app-container-nginx Tim Orling
2026-05-30 1:31 ` [meta-virtualization][PATCH 6/7] vcontainer-bbmask.inc: allow meta-webserver/recipes-httpd Tim Orling
2026-05-30 1:31 ` [meta-virtualization][PATCH 7/7] app-container-curl: use multilayer mode; container-nonroot-user Tim Orling
2026-06-05 3:31 ` [meta-virtualization][PATCH 0/7] Container improvements Bruce Ashfield
2026-06-12 16:54 ` [meta-virtualization][PATCH 1/7] classes: add container-nonroot-user.bbclass Bruce Ashfield
2026-07-03 15:27 ` Tim Orling
2026-06-12 17:57 ` [meta-virtualization][PATCH 2/7] recipes-containers/images: add app-container-python Bruce Ashfield
2026-07-03 15:27 ` Tim Orling
2026-06-12 18:06 ` [meta-virtualization][PATCH 3/7] recipes-containers/images: add app-container-mosquitto Bruce Ashfield
2026-07-03 15:27 ` Tim Orling
2026-06-12 18:11 ` [meta-virtualization][PATCH 4/7] recipes-containers/images: add app-container-valkey Bruce Ashfield
2026-07-03 15:28 ` Tim Orling
2026-06-12 18:15 ` [meta-virtualization][PATCH 5/7] recipes-containers/images: add app-container-nginx Bruce Ashfield
2026-07-03 15:28 ` Tim Orling
2026-06-12 18:19 ` [meta-virtualization][PATCH 6/7] vcontainer-bbmask.inc: allow meta-webserver/recipes-httpd Bruce Ashfield
2026-07-03 15:28 ` Tim Orling
2026-06-12 18:23 ` [meta-virtualization][PATCH 7/7] app-container-curl: use multilayer mode; container-nonroot-user Bruce Ashfield
2026-07-03 15:28 ` Tim Orling
2026-07-06 17:12 ` Tim Orling [this message]
2026-07-06 17:12 ` [PATCH v2 01/13] image-oci: set OCI_IMAGE_RUNTIME_UID with ??= Tim Orling
2026-07-06 17:12 ` [PATCH v2 02/13] classes: add container-nonroot-user.bbclass Tim Orling
2026-07-06 17:12 ` [PATCH v2 03/13] classes: add container-volatile-fixup.bbclass Tim Orling
2026-07-06 17:12 ` [PATCH v2 04/13] classes: add container-dev-mode.bbclass Tim Orling
2026-07-06 17:12 ` [PATCH v2 05/13] recipes-containers/images: add app-container-python Tim Orling
2026-07-06 17:12 ` [PATCH v2 06/13] recipes-containers/images: add app-container-mosquitto Tim Orling
2026-07-06 17:12 ` [PATCH v2 07/13] vcontainer-bbmask.inc: allow 'mosquitto', 'libwebsockets' Tim Orling
2026-07-06 17:12 ` [PATCH v2 08/13] recipes-containers/images: add app-container-valkey Tim Orling
2026-07-06 17:12 ` [PATCH v2 09/13] recipes-containers/images: add app-container-nginx Tim Orling
2026-07-06 17:12 ` [PATCH v2 10/13] vcontainer-bbmask.inc: allow meta-webserver/recipes-httpd/nginx Tim Orling
2026-07-06 17:12 ` [PATCH v2 11/13] app-container-curl: use multilayer mode; container-nonroot-user Tim Orling
2026-07-06 17:12 ` [PATCH v2 12/13] container-image-multiarch: add helper recipe Tim Orling
2026-07-06 17:12 ` [PATCH v2 13/13] vcontainer-tarball: fix buildbot-venv shadowing Tim Orling
2026-07-08 1:43 ` [meta-virtualization] [PATCH v2 00/13] Container Improvements Bruce Ashfield
2026-07-20 20:52 ` Bruce Ashfield
2026-07-29 21:49 ` Tim Orling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1783356922.git.tim.orling@konsulko.com \
--to=ticotimo@gmail.com \
--cc=meta-virtualization@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox