On Mon, Mar 2, 2026 at 11:04 PM Bruce Ashfield via lists.yoctoproject.org
<[email protected]> wrote:

>
>
> On Mon, Mar 2, 2026 at 9:52 PM Yiding Liu (Fujitsu) <
> [email protected]> wrote:
>
>> Hi Bruce
>>     1.  I follow the step of running oci image in  image-oci.bbclass but
>> it has error in runc.
>>
>>     # tar -xvf container-base-latest-oci-dir.tar
>>     # oci-image-tool create --ref name=latest
>> container-base-qemux86-64.rootfs-20260302090735.rootfs-oci
>> container-base-oci-bundle
>>
>     # runc run -b container-base-oci-bundle ctr-build
>> ERRO[0000] runc run failed: unable to start container process: error
>> during container init: open /dev/pts/ptmx: no such file or directory
>>
>>   2. Then I follow the comment in image-oci-umoci.inc using two methods
>> which can run container successfully
>>     # make a tar version of the image direcotry
>>     #  1) image_name.tar: compatible with oci tar format, blobs and rootfs
>>     #     are at the top level. Can load directly from something like
>> podman
>>     #  2)image_name-dir.ta: original format from meta-virt, is just a
>> tar'd
>>     #     up oci image directory (compatible with skopeo :dir format)
>>
>>    2.1 Method 1 for image_name.tar
>> # podman load -i container-base-latest-oci.tar
>>
>> # podman images | grep localhost/latest
>> localhost/latest                           latest      1d603a1041c5  14
>> years ago   5.58 MB
>>
>> # podman run -it 1d603a1041c5
>> / # ls
>> bin    boot   dev    etc    home   lib    media  mnt    proc   root   run
>>    sbin   sys    tmp    usr    var
>>
>>     2.2  Method 2 for image_name-dir.tar
>> # tar xvf container-base-latest-oci-dir.tar
>> # skopeo copy
>> oci:container-base-qemux86-64.rootfs-20260302090735.rootfs-oci:latest
>> containers-storage:container-base-qemux86-64:1.0
>> # podman images | grep container-base-qemux86-64
>> docker.io/library/container-base-qemux86-64  1.0         1d603a1041c5
>>  14 years ago   5.58 MB
>>
>> # podman run --rm -it 1d603a1041c5
>> / # ls
>> bin    boot   dev    etc    home   lib    media  mnt    proc   root   run
>>    sbin   sys    tmp    usr    var
>>
>>        Based on this phenomenon, I think we can modify the  description
>> of usage of oci image in image-oci.bbclass to use the  two methods above.
>>
>>        What do you think about my suggestion?
>>
>
> When I wrote that comment, oci-image-tools were capable of creating a
> bundle that runc could directly execute.
>
> I'm actually in the process of upgrading bare bundles + runc to work with
> the new architecture that I've created for bundling docker and podman
> containers (something called vrunc), but that isn't quite ready yet.
>
> So yes, I'd say that we could remove the oci-image-tool reference and just
> update it to suggest umnoci like the  image-oci-umoci.inc
>
> When I have bare runc working again, I can update the headers will those
> details as well.
>

Here's what I ended up doing in my work to update for just "runc" execution:

> mkdir t; cd t
> tar xvf ../container-base-latest-oci.tar
./
./blobs/
./blobs/sha256/
./blobs/sha256/9c865925ea89ca977d07df924f6dcb46f0e8e605aaac9f326fdbdb1d6025179a
./blobs/sha256/abcca458983fe432ab53fed222d30fb40ba5ffebd966a31312aa57672cc22365
./blobs/sha256/26a875ac118866f5f5d9d0e81504c2d013e7dd59dcfb4f556656608a3b78e64c
./blobs/sha256/97957e8c0e5ae4f1f05097c17d89348a3e3d4133b58b469799752806943bce91
./blobs/sha256/7ab75280a05b336e98e4d8100e15e562fefaed17bf91957b408ad52f8ee2523c
./blobs/sha256/561858046f0d0bec4c5e9441f7c8fe712a787149cab37a62da0cf2027187cdda
./blobs/sha256/55e338157da42fa767d8f133ebf9d1324e1ed3ebf34f10aa9d630048c39500cb
./blobs/sha256/788385c41c0ff5f824b392c4719d820e267ae86e174cb4a76ce4c9c89380292d
./blobs/sha256/9e60bcc8bff0c2b33a8063612d23d6bd0ba721f63a50213c295840c9eccc57a3
./blobs/sha256/60bac006254f0dc3e49ebbb007e0144bb95229c215cf3d4c8c64dc10555c1fc4
./blobs/sha256/61813b4d501970740bedb007fcd41e34117fdaea8761ae0fd3230effcfc5fd95
./blobs/sha256/e503c33223590248dc2e15806120a04fbd75dcdbdaf597807f10d25324bb8f77
./blobs/sha256/0c62a8d0deedfe296fc5180e512d296618d615146face55342707f3e49359937
./blobs/sha256/b3dcd199b033d226d32289cfeadc894ba94af762dc48dfe07bda97e6c257bf3d
./blobs/sha256/1b3615a1e71b8ef260a22c8300eb2e40122ac244a15a01d3f53699ae4fa3c916
./blobs/sha256/aff80661b33e7fa0e4778f5d01179f082860c8c7f0dc16b49158668297b8769c
./blobs/sha256/4234f83392f7dfb358ef6ff4de282548338d5fbe724c150ebb41065fd32685c6
./index.json
./oci-layout
> cd ..
> oci-image-tool create --ref name=latest t container-base-oci-bundle
> cd container-base-oci-bundle
> cp config.json config.image.json
> rm -f config.json
> XDG_RUNTIME_DIR=/tmp runc spec
> jq -s '
    .[0] as $img | .[1] as $base |
    $base
    | .root.path = ($img.root.path // "rootfs")
    | .process.args = ($img.process.args // $base.process.args)
    | .process.cwd = ($img.process.cwd // $base.process.cwd)
    | .process.user = ($img.process.user // $base.process.user)
    | .process.env = (($base.process.env // []) + ($img.process.env // [])
| unique)
  ' config.image.json config.json > config.merged.json && mv
config.merged.json config.json
> cd ..
> sudo runc run -b container-base-oci-bundle ctr-build
/ # ls
bin    boot   dev    etc    home   lib    media  mnt    proc   root   run
 sbin   sys    tmp    usr    var

------------------------

Fundamentally, we need the runc spec, not what the outdated oci-image-tools
create.

So rather than go directly to the more complex tools, I'd update the class
to indicate steps
similar to those.

Bruce



>
> Bruce
>
>
>>
>> Liu
>>
>>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await thee
> at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
>
> 
>
>

-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9616): 
https://lists.yoctoproject.org/g/meta-virtualization/message/9616
Mute This Topic: https://lists.yoctoproject.org/mt/118107901/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to