All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenther Meyer <g.meyer@signum-media.de>
To: meta-virtualization@lists.yoctoproject.org
Subject: Re: [meta-virtualization] Problems building an OCI container image
Date: Wed, 09 Nov 2022 12:05:46 +0100	[thread overview]
Message-ID: <3841288.YgC1jYaZfg@serenity> (raw)
In-Reply-To: <CADkTA4NDNN=gkkCz0DG1VMHSq_S_1su3jEUa1oYcWDM79PDGkQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2779 bytes --]

On Dienstag, 8. November 2022 17:37:18 CET Bruce Ashfield wrote:
> On Tue, Nov 8, 2022 at 10:45 AM Guenther Meyer <g.meyer@signum-media.de> 
wrote:
> I recently tweaked the container image backends to make an additional
> symlink, you can see those on the master-next branch of meta-virt.

That's exactly what I need.  Would it be possible to backport that to 
kirkstone?


> > The second issue is the resulting tar-file. I thought, I could directly
> > load it as an image, but that results in an error.
> > Investigating the content of the archive, I found, that the necessary
> > content like index.json, oci-layout ad blob/* is not on the root level
> > but inside a subfolder
> > "example-container-qemux86-64-20221108152401.rootfs-oci/".
> > 
> > Is that intentional, if yes, why?
> > Because when I create an archive with the same files on the root level, it
> > can directly be used with podman or other tools.
> 
> This has been discussed on the list before, it is intentional. The tar file
> was created to make handling the images a bit easier (since when i did the
> work, the oci image class was just specifying directories). There are
> workflows and use-cases that expect that format. I promised to think about
> how to handle and support both use cases, and I haven't come up with an
> answer yet.
> 
> I'll get to that shortly (fingers crossed).
> 
> The primary use case for the oci images is that they are expected to be
> manipulated with something with skopeo and copied/transformed in that
> sort of workflow.

That's interesting, what are those workflows and use cases? I guess, skopeo 
should be able to handle the image also without the subfolder, because that's 
what the oci specs says - at least as I understand it.

I see two main use cases here: The one is to load the image directly into a 
container runtime, the other would be to push it to a registry.

Don't get me wrong, I could easily create my own tar from the image folder.
But I would expect, that a generated tar image could be used directly without 
any additional handling.
Loading the tar directly with tools like podman or ctr works, when the 
expected file structure is at the root of the tar file, but not when there is an 
additional directory.


> > If I want to use a predeployed image with k3s, what is the name of the
> > image that I have to use in the deployment yaml? Is it just the filename
> > or is it something else? If the latter, how do I set the image name
> > during the build?
> I've never done something predeployed (or at least what I think of in that
> sense), but you can find a very simple example of a yaml file that I did for
> a ELC presentation in the meta-virt layer itself
> (recipes-demo/helloworld-flask/helloworld-flask)

Thanks, I will have a look.


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-11-09 11:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 15:44 Problems building an OCI container image Guenther Meyer
2022-11-08 16:37 ` [meta-virtualization] " Bruce Ashfield
2022-11-09 11:05   ` Guenther Meyer [this message]

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=3841288.YgC1jYaZfg@serenity \
    --to=g.meyer@signum-media.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.