Document the image-container class
cover Document the image-container class
---
Antonin Godard (2):
ref-manual/variables.rst: document the IMAGE_CONTAINER_NO_DUMMY variable ref-manual/classes.rst: document the image-container class
documentation/ref-manual/classes.rst | 51 ++++++++++++++++++++++++++++++++++ documentation/ref-manual/variables.rst | 7 +++++ 2 files changed, 58 insertions(+)
---
base-commit: b7f5b8ee510eeec286f2b0daece2717245b5b177
change-id: 20251023-image-container-fdc6d79f6729
PATCH 1/2 ref-manual/variables.rst: document the IMAGE_CONTAINER_NO_DUMMY variable
Added in OE-Core with commit f0645e172bb8 ("image-container.bbclass:
Error if not using linux-dummy").
--- documentation/ref-manual/variables.rst | 7 +++++++ 1 file changed, 7 insertions(+)
documentation/ref-manual/variables.rst +7 -0
@@ -3955,6 +3955,13 @@ system and gives an overview of their function and contents. variable, see the :ref:`ref-classes-image_types` class file, which is ``meta/classes-recipe/image_types.bbclass``. + :term:`IMAGE_CONTAINER_NO_DUMMY` + When inheriting the :ref:`ref-classes-image-container` class, this variable + can be set to "1" to allow a :term:`PREFERRED_PROVIDER` for the Linux kernel + (``virtual/kernel``) different than ``linux-dummy``. + + This variable should be set from a :term:`Configuration File`. + :term:`IMAGE_DEVICE_TABLES` Specifies one or more files that contain custom device tables that are passed to the ``makedevs`` command as part of creating an image.
Signature · 1 line
2.51.0
Re: [docs] [PATCH 1/2] ref-manual/variables.rst: document the IMAGE_CONTAINER_NO_DUMMY variable
Hi Antonin,
Seems like the SMTP server only sent the mail to myself and not other recipients. I've got to stop using this corporate setup, it's only bringing me pain.
I've already removed what I told in patch 2 was to be scratched in patch 1 ;)
Quoted 13 lines · Antonin Godard via lists.yoctoproject.org
Added in OE-Core with commit
f0645e172bb8("image-container.bbclass:
Error if not using linux-dummy").Signed-off-by Antonin Godard <[email protected]>--- documentation/ref-manual/variables.rst | 7 +++++++ 1 file changed, 7 insertions(+)documentation/ref-manual/variables.rst +0
-0
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3962
Quoted 8 lines
documentation/ref-manual/variables.rst +5
-0@@ -3955,6 +3955,13 @@ system and gives an overview of their function and contents. variable, see the :ref:`ref-classes-image_types` class file, which is ``meta/classes-recipe/image_types.bbclass``. + :term:`IMAGE_CONTAINER_NO_DUMMY` + When inheriting the :ref:`ref-classes-image-container` class, this variable + can be set to "1" to allow a :term:`PREFERRED_PROVIDER` for the Linux kernel + (``virtual/kernel``) different than ``linux-dummy``. +
This seems to imply to me the default is "linux-dummy" but that isn't the case. Why would anyone select linux-dummy? A few words or cross-referencing another part of the doc where this would be explained would be nice.
This also *could* imply that setting IMAGE_CONTAINER_NO_DUMMY to 0 is going to do automagic stuff for PREFERRED_PROVIDER but it isn't. I would add something like:
:term:PREFERRED_PROVIDER also needs to be explicitly specified for ``virtual/kernel`` (e.g. ``linux-dummy``, ``linux-yocto``, ...).
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3964
Quoted 2 lines
documentation/ref-manual/variables.rst +2
-0+ This variable should be set from a :term:`Configuration File`. +
Are you sure about that? This variable is handled from a recipe class, itself inherited only when the IMAGE_FSTYPES contains "container". The examples in meta-virtualization all have it set in an image recipe.
Cheers,
Quentin
Re: [docs] [PATCH 1/2] ref-manual/variables.rst: document the IMAGE_CONTAINER_NO_DUMMY variable
Hi,
Quoted 37 lines · Quentin Schulz via lists.yoctoproject.org
Hi Antonin,
Seems like the SMTP server only sent the mail to myself and not other recipients. I've got to stop using this corporate setup, it's only bringing me pain.
I've already removed what I told in patch 2 was to be scratched in patch 1 ;)
Quoted 13 lines · Antonin Godard via lists.yoctoproject.org
Added in OE-Core with commit
f0645e172bb8("image-container.bbclass:
Error if not using linux-dummy").Signed-off-by Antonin Godard <[email protected]>--- documentation/ref-manual/variables.rst | 7 +++++++ 1 file changed, 7 insertions(+)documentation/ref-manual/variables.rst +0
-0documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3962
Quoted 8 lines
documentation/ref-manual/variables.rst +5
-0@@ -3955,6 +3955,13 @@ system and gives an overview of their function and contents. variable, see the :ref:`ref-classes-image_types` class file, which is ``meta/classes-recipe/image_types.bbclass``. + :term:`IMAGE_CONTAINER_NO_DUMMY` + When inheriting the :ref:`ref-classes-image-container` class, this variable + can be set to "1" to allow a :term:`PREFERRED_PROVIDER` for the Linux kernel + (``virtual/kernel``) different than ``linux-dummy``. +This seems to imply to me the default is "linux-dummy" but that isn't the case. Why would anyone select linux-dummy? A few words or cross-referencing another part of the doc where this would be explained would be nice.
Quoted 6 lines
This also *could* imply that setting
IMAGE_CONTAINER_NO_DUMMYto 0 is going to do automagic stuff forPREFERRED_PROVIDERbut it isn't. I would add something like::term:
PREFERRED_PROVIDERalso needs to be explicitly specified for ``virtual/kernel`` (e.g. ``linux-dummy``, ``linux-yocto``, ...).
When building an image that inherits the image-container class, it's preferred that PREFERRED_PROVIDER_virtual/kernel is set to "linux-dummy" globally.
Quoted 6 lines
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3964
Quoted 2 lines
documentation/ref-manual/variables.rst +2
-0+ This variable should be set from a :term:`Configuration File`. +Are you sure about that? This variable is handled from a recipe class, itself inherited only when the
IMAGE_FSTYPEScontains "container". The examples in meta-virtualization all have it set in an image recipe.
Indeed, setting this from the image recipe should be enough.
Rephrased to:
"""
When an image recipe inherits the :ref:ref-classes-image-container class, it expects the :term:PREFERRED_PROVIDER for the Linux kernel (``virtual/kernel``) to be set to ``linux-dummy`` from a :term:configuration file. Otherwise, an error is triggered.
The :term:IMAGE_CONTAINER_NO_DUMMY variable allows the :term:PREFERRED_PROVIDER variable to be set to another value, thus skipping the check and not triggering the build error.
This variable should be set from the image recipe inheriting the :ref:ref-classes-image-container class.
See the documentation of the :ref:ref-classes-image-container class for more information on why setting the :term:PREFERRED_PROVIDER to ``linux-dummy`` is advised with this class.
"""
Thanks,
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [docs] [PATCH 1/2] ref-manual/variables.rst: document the IMAGE_CONTAINER_NO_DUMMY variable
Quoted 44 lines · Antonin Godard
Hi,
Quoted 41 lines · Quentin Schulz via lists.yoctoproject.org
Hi Antonin,
Seems like the SMTP server only sent the mail to myself and not other recipients. I've got to stop using this corporate setup, it's only bringing me pain.
I've already removed what I told in patch 2 was to be scratched in patch 1 ;)
Quoted 13 lines · Antonin Godard via lists.yoctoproject.org
Added in OE-Core with commit
f0645e172bb8("image-container.bbclass:
Error if not using linux-dummy").Signed-off-by Antonin Godard <[email protected]>--- documentation/ref-manual/variables.rst | 7 +++++++ 1 file changed, 7 insertions(+)documentation/ref-manual/variables.rst +0
-0documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3962
Quoted 8 lines
documentation/ref-manual/variables.rst +5
-0@@ -3955,6 +3955,13 @@ system and gives an overview of their function and contents. variable, see the :ref:`ref-classes-image_types` class file, which is ``meta/classes-recipe/image_types.bbclass``. + :term:`IMAGE_CONTAINER_NO_DUMMY` + When inheriting the :ref:`ref-classes-image-container` class, this variable + can be set to "1" to allow a :term:`PREFERRED_PROVIDER` for the Linux kernel + (``virtual/kernel``) different than ``linux-dummy``. +This seems to imply to me the default is "linux-dummy" but that isn't the case. Why would anyone select linux-dummy? A few words or cross-referencing another part of the doc where this would be explained would be nice.
This also *could* imply that setting
IMAGE_CONTAINER_NO_DUMMYto 0 is going to do automagic stuff forPREFERRED_PROVIDERbut it isn't. I would add something like:
Quoted 6 lines
Quoted 2 lines
:term:
PREFERRED_PROVIDERalso needs to be explicitly specified for ``virtual/kernel`` (e.g. ``linux-dummy``, ``linux-yocto``, ...).When building an image that inherits the image-container class, it's preferred that PREFERRED_PROVIDER_virtual/kernel is set to "linux-dummy" globally.
Yes, but this isn't the default in bitbake.conf or anywhere for that matter so it *needs* to be set to something (linux-dummy would be the preferred one as typically containers do not run their own kernel).
Quoted 17 lines
Quoted 6 lines
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 3964
Quoted 2 lines
documentation/ref-manual/variables.rst +2
-0+ This variable should be set from a :term:`Configuration File`. +Are you sure about that? This variable is handled from a recipe class, itself inherited only when the
IMAGE_FSTYPEScontains "container". The examples in meta-virtualization all have it set in an image recipe.Indeed, setting this from the image recipe should be enough.
Rephrased to:
"""
When an image recipe inherits the :ref:ref-classes-image-containerclass, it expects the :term:PREFERRED_PROVIDERfor the Linux kernel (``virtual/kernel``) to be set to ``linux-dummy`` from a :term:configuration file. Otherwise, an error is triggered.
Quoted 7 lines
The :term:
IMAGE_CONTAINER_NO_DUMMYvariable allows the :term:PREFERRED_PROVIDERvariable to be set to another value, thus skipping the check and not triggering the build error.This variable should be set from the image recipe inheriting the :ref:
ref-classes-image-containerclass.
From patch 2, image-container isn't to be inherited manually, but IMAGE_FSTYPES needs to have "container" in it. Though the end result is the same... not sure it's worth the complexity in the docs. Or maybe just remove everything after "image recipe" (keep the paragraph below here though...). Or say "by adding "container" to :term:IMAGE_FSTYPES"? See also first sentence in this suggested section ("When an image recipe inherits..."), probably would need the same clarification.
Quoted 4 lines
See the documentation of the :ref:
ref-classes-image-containerclass for more information on why setting the :term:PREFERRED_PROVIDERto ``linux-dummy`` is advised with this class.
"""
Cheers,
Quentin
Re: [docs] [PATCH 1/2] ref-manual/variables.rst: document the IMAGE_CONTAINER_NO_DUMMY variable
Hi,
On Tue Dec 16, 2025 at 12:01 PM CET, Quentin Schulz wrote:
[...]
Quoted 8 lines
From patch 2, image-container isn't to be inherited manually, but
IMAGE_FSTYPESneeds to have "container" in it. Though the end result is the same... not sure it's worth the complexity in the docs. Or maybe just remove everything after "image recipe" (keep the paragraph below here though...). Or say "by adding "container" to :term:IMAGE_FSTYPES"? See also first sentence in this suggested section ("When an image recipe inherits..."), probably would need the same clarification.
Yes, just realized this… I'm reworking the class and variable documentation, to say that IMAGE_FSTYPES is enough to use this class.
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/2 ref-manual/classes.rst: document the image-container class
In reply to Antonin GodardAdd documentation for the image-container class, which is a simple class to generate an image suitable for creating a container.
This answers in part to questions asked in [YOCTO #14368].
--- documentation/ref-manual/classes.rst | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
documentation/ref-manual/classes.rst +51 -0
@@ -1258,6 +1258,57 @@ The :ref:`ref-classes-image_types` class also handles conversion and compression :term:`IMAGE_FSTYPES`. This would also be similar for Virtual Box Virtual Disk Image ("vdi") and QEMU Copy On Write Version 2 ("qcow2") images. +.. _ref-classes-image-container: + +``image-container`` +=================== + +The :ref:`ref-classes-image-container` class is meant to be inherited in +:doc:`image </ref-manual/images>` recipes. It provides relevant settings to +generate an image ready for use with an :wikipedia:`OCI +<Open_Container_Initiative>`-compliant container management tool. + +.. note:: + + This class does not build and install container management tools on the + target. Support for this is available in the :yocto_git:`meta-virtualization + </meta-virtualization>` layer. + +An image recipe inheriting this class should also add the ``container`` image +type to the :term:`IMAGE_FSTYPES` variable:: + + IMAGE_FSTYPES += "container" + +This image type does not deploy anything specific in :term:`DEPLOY_DIR_IMAGE`, +but will simply add ``tar.bz2`` to the image types. + +You must also set the :term:`PREFERRED_PROVIDER` for the Linux kernel to +``linux-dummy`` in a :term:`configuration file`:: + + PREFERRED_PROVIDER_virtual/kernel = "linux-dummy" + +The ``linux-dummy`` recipes acts as a Linux kernel recipe but builds nothing. It +is relevant in this case as a container image does not need to include a Linux +kernel. Selecting it as the preferred provider for the kernel will also decrease +build time. + +If desired, the :term:`IMAGE_CONTAINER_NO_DUMMY` variable can be set to "1" to +skip the ``PREFERRED_PROVIDER_virtual/kernel`` check. + +After the image is built, the generated ``tar.bz2`` archive can be used in a +container generation file. For example, to be used with :wikipedia:`Podman +<Podman>` or :wikipedia:`Docker <Docker_(software)>`, a `container file +<https://docs.docker.com/reference/dockerfile/>`__ could contain the following +instructions: + +.. code-block:: dockerfile + + FROM scratch + ADD ./image-container-qemux86-64.rootfs.tar.bz2 / + ENTRYPOINT /bin/sh + +This is suitable to build a container using our generated root filesystem image. + .. _ref-classes-image-live: ``image-live``
Signature · 1 line
2.51.0
Re: [docs] [PATCH 2/2] ref-manual/classes.rst: document the image-container class
Hi Antonin,
Quoted 3 lines · Antonin Godard via lists.yoctoproject.org
Add documentation for the image-container class, which is a simple class to generate an image suitable for creating a container.
Wrong order of patches, patch 1 uses the reflink created in this patch.
EDIT: and this patch depends on patch 1 as well, so just merge both of them into one patch, they are related anyway.
Quoted 14 lines
This answers in part to questions asked in [YOCTO #14368].
Signed-off-by Antonin Godard <[email protected]>--- documentation/ref-manual/classes.rst | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)documentation/ref-manual/classes.rst +0
-0@@ -1258,6 +1258,57 @@ The :ref:`ref-classes-image_types` class also handles conversion and compression :term:`IMAGE_FSTYPES`. This would also be similar for Virtual Box Virtual Disk Image ("vdi") and QEMU Copy On Write Version 2 ("qcow2") images.
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1269
Quoted 10 lines
documentation/ref-manual/classes.rst +9
-0+.. _ref-classes-image-container: + +``image-container`` +=================== + +The :ref:`ref-classes-image-container` class is meant to be inherited in +:doc:`image </ref-manual/images>` recipes. It provides relevant settings to +generate an image ready for use with an :wikipedia:`OCI +<Open_Container_Initiative>`-compliant container management tool.
such as....? podman and docker I assume, probably others.
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1273
Quoted 4 lines
documentation/ref-manual/classes.rst +4
-0+ +.. note:: + + This class does not build and install container management tools on the
s/does not build and install/neither builds nor installs/
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1274
Quoted 1 line
documentation/ref-manual/classes.rst +1
-0+ target. Support for this is available in the :yocto_git:`meta-virtualization
s/Support for this is/Those tools are/?
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1281
Quoted 7 lines
documentation/ref-manual/classes.rst +7
-0+ </meta-virtualization>` layer. + +An image recipe inheriting this class should also add the ``container`` image +type to the :term:`IMAGE_FSTYPES` variable:: + + IMAGE_FSTYPES += "container" +
Isn't that done by image.bbclass already anyway? This class is automatically inherited when IMAGE_FSTYPES contains "container".
c.f. https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/image.bbclass#n20 and https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/image.bbclass#n25 ?
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1285
Quoted 4 lines
documentation/ref-manual/classes.rst +4
-0+This image type does not deploy anything specific in :term:`DEPLOY_DIR_IMAGE`, +but will simply add ``tar.bz2`` to the image types. + +You must also set the :term:`PREFERRED_PROVIDER` for the Linux kernel to
No. You *can* (and you typically want).
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression
Quoted 4 lines
documentation/ref-manual/classes.rst +4
-0+``linux-dummy`` in a :term:`configuration file`:: + + PREFERRED_PROVIDER_virtual/kernel = "linux-dummy" +> +The ``linux-dummy`` recipes acts as a Linux kernel recipe but builds
nothing. It
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1297
Quoted 7 lines
documentation/ref-manual/classes.rst +7
-0+is relevant in this case as a container image does not need to include a Linux +kernel. Selecting it as the preferred provider for the kernel will also decrease +build time. + +If desired, the :term:`IMAGE_CONTAINER_NO_DUMMY` variable can be set to "1" to +skip the ``PREFERRED_PROVIDER_virtual/kernel`` check. +
Ah scratch that review on patch 1, linux-dummy isn't the default.
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1299
Quoted 2 lines
documentation/ref-manual/classes.rst +2
-0+After the image is built, the generated ``tar.bz2`` archive can be used in a +container generation file. For example, to be used with :wikipedia:`Podman
Being curious, where did you see "container generation file" being used? First time I see Containerfile/Dockerfile named this way. You could keep it but maybe specify that it's typically named Containerfile or Dockerfile so people know what we're talking about?
Cheers,
Quentin
Re: [docs] [PATCH 2/2] ref-manual/classes.rst: document the image-container class
Hi,
Quoted 11 lines · Quentin Schulz
Hi Antonin,
Quoted 3 lines · Antonin Godard via lists.yoctoproject.org
Add documentation for the image-container class, which is a simple class to generate an image suitable for creating a container.
Wrong order of patches, patch 1 uses the reflink created in this patch.
EDIT: and this patch depends on patch 1 as well, so just merge both of them into one patch, they are related anyway.
Yeah, I thought I was being smart by making sure the order was right, turns out they should be merged together!
Quoted 67 lines
Quoted 14 lines
This answers in part to questions asked in [YOCTO #14368].
Signed-off-by Antonin Godard <[email protected]>--- documentation/ref-manual/classes.rst | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)documentation/ref-manual/classes.rst +0
-0@@ -1258,6 +1258,57 @@ The :ref:`ref-classes-image_types` class also handles conversion and compression :term:`IMAGE_FSTYPES`. This would also be similar for Virtual Box Virtual Disk Image ("vdi") and QEMU Copy On Write Version 2 ("qcow2") images.documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1269
Quoted 10 lines
documentation/ref-manual/classes.rst +9
-0+.. _ref-classes-image-container: + +``image-container`` +=================== + +The :ref:`ref-classes-image-container` class is meant to be inherited in +:doc:`image </ref-manual/images>` recipes. It provides relevant settings to +generate an image ready for use with an :wikipedia:`OCI +<Open_Container_Initiative>`-compliant container management tool.such as....? podman and docker I assume, probably others.
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1273
Quoted 4 lines
documentation/ref-manual/classes.rst +4
-0+ +.. note:: + + This class does not build and install container management tools on thes/does not build and install/neither builds nor installs/
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1274
Quoted 1 line
documentation/ref-manual/classes.rst +1
-0+ target. Support for this is available in the :yocto_git:`meta-virtualizations/Support for this is/Those tools are/?
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1281
Quoted 7 lines
documentation/ref-manual/classes.rst +7
-0+ </meta-virtualization>` layer. + +An image recipe inheriting this class should also add the ``container`` image +type to the :term:`IMAGE_FSTYPES` variable:: + + IMAGE_FSTYPES += "container" +Isn't that done by image.bbclass already anyway? This class is automatically inherited when
IMAGE_FSTYPEScontains "container".c.f.
https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/image.bbclass#n20
and
https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/image.bbclass#n25
?documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1285
Quoted 4 lines
documentation/ref-manual/classes.rst +4
-0+This image type does not deploy anything specific in :term:`DEPLOY_DIR_IMAGE`, +but will simply add ``tar.bz2`` to the image types. + +You must also set the :term:`PREFERRED_PROVIDER` for the Linux kernel toNo. You *can* (and you typically want).
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression
Quoted 4 lines
documentation/ref-manual/classes.rst +4
-0+``linux-dummy`` in a :term:`configuration file`:: + + PREFERRED_PROVIDER_virtual/kernel = "linux-dummy" +> +The ``linux-dummy`` recipes acts as a Linux kernel recipe but buildsnothing. It
Quoted 9 lines
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1297
Quoted 7 lines
documentation/ref-manual/classes.rst +7
-0+is relevant in this case as a container image does not need to include a Linux +kernel. Selecting it as the preferred provider for the kernel will also decrease +build time. + +If desired, the :term:`IMAGE_CONTAINER_NO_DUMMY` variable can be set to "1" to +skip the ``PREFERRED_PROVIDER_virtual/kernel`` check. +Ah scratch that review on patch 1, linux-dummy isn't the default.
I haven't seen your review on patch 1 (locally or on lore.kernel.org), did you forget to send it?
Quoted 4 lines
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1299
Quoted 2 lines
documentation/ref-manual/classes.rst +2
-0+After the image is built, the generated ``tar.bz2`` archive can be used in a +container generation file. For example, to be used with :wikipedia:`PodmanBeing curious, where did you see "container generation file" being used?
Nowhere else, I made that up I guess. I'll reword this and mention Containerfile/Dockerfile.
Quoted 3 lines
First time I see Containerfile/Dockerfile named this way. You could keep it but maybe specify that it's typically named Containerfile or Dockerfile so people know what we're talking about?
Thanks!
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [docs] [PATCH 2/2] ref-manual/classes.rst: document the image-container class
In reply to Quentin SchulzHi,
Quoted 61 lines · Quentin Schulz
Hi Antonin,
Quoted 3 lines · Antonin Godard via lists.yoctoproject.org
Add documentation for the image-container class, which is a simple class to generate an image suitable for creating a container.
Wrong order of patches, patch 1 uses the reflink created in this patch.
EDIT: and this patch depends on patch 1 as well, so just merge both of them into one patch, they are related anyway.
Quoted 14 lines
This answers in part to questions asked in [YOCTO #14368].
Signed-off-by Antonin Godard <[email protected]>--- documentation/ref-manual/classes.rst | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)documentation/ref-manual/classes.rst +0
-0@@ -1258,6 +1258,57 @@ The :ref:`ref-classes-image_types` class also handles conversion and compression :term:`IMAGE_FSTYPES`. This would also be similar for Virtual Box Virtual Disk Image ("vdi") and QEMU Copy On Write Version 2 ("qcow2") images.documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1269
Quoted 10 lines
documentation/ref-manual/classes.rst +9
-0+.. _ref-classes-image-container: + +``image-container`` +=================== + +The :ref:`ref-classes-image-container` class is meant to be inherited in +:doc:`image </ref-manual/images>` recipes. It provides relevant settings to +generate an image ready for use with an :wikipedia:`OCI +<Open_Container_Initiative>`-compliant container management tool.such as....? podman and docker I assume, probably others.
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1273
Quoted 4 lines
documentation/ref-manual/classes.rst +4
-0+ +.. note:: + + This class does not build and install container management tools on thes/does not build and install/neither builds nor installs/
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1274
Quoted 1 line
documentation/ref-manual/classes.rst +1
-0+ target. Support for this is available in the :yocto_git:`meta-virtualizations/Support for this is/Those tools are/?
documentation/ref-manual/classes.rst The :ref:`ref-classes-image_types` class also handles conversion and compression · line 1281
Quoted 7 lines
documentation/ref-manual/classes.rst +7
-0+ </meta-virtualization>` layer. + +An image recipe inheriting this class should also add the ``container`` image +type to the :term:`IMAGE_FSTYPES` variable:: + + IMAGE_FSTYPES += "container" +Isn't that done by image.bbclass already anyway? This class is automatically inherited when
IMAGE_FSTYPEScontains "container".
Quoted 5 lines
c.f.
https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/image.bbclass#n20
and
https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/image.bbclass#n25
?
Ah, so actually you're supposed to just add "container" to IMAGE_FSTYPES rather than inheriting the class. I wonder why this was designed like this rather than just a class inherit, it's not obvious/usual.
I will instruct to only set IMAGE_FSTYPES then.
Thanks,
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com