Skip to content

images: add docker-archive output for containers#984

Open
Shreejit-03 wants to merge 1 commit intoni:nilrt/master/nextfrom
Shreejit-03:nilrt/master/next
Open

images: add docker-archive output for containers#984
Shreejit-03 wants to merge 1 commit intoni:nilrt/master/nextfrom
Shreejit-03:nilrt/master/next

Conversation

@Shreejit-03
Copy link
Copy Markdown
Contributor

@Shreejit-03 Shreejit-03 commented Apr 3, 2026

Summary of Changes

This adds a new image-oci-docker bbclass that converts the OCI image archive produced by image-oci into docker-archive format using skopeo-native. The resulting .docker.tar can be loaded directly with docker load -i — no host-side tooling (skopeo, Dockerfile, etc.) is required.

Both nilrt-slim-container and nilrt-runmode-container now produce a .docker.tar artifact alongside the existing OCI tar.

How to Build

bitbake nilrt-slim-container
bitbake nilrt-runmode-container

How to use — Docker

docker load -i build/tmp-glibc/deploy/images/x64/nilrt-slim-container-<VERSION>-slim-docker.tar
docker load -i build/tmp-glibc/deploy/images/x64/nilrt-runmode-container-<VERSION>-docker.tar

docker run -it nilrt-slim-container:<VERSION>-slim
docker run -it nilrt-runmode-container:<VERSION>
docker run --privileged --network=host -it nilrt-runmode-container:<VERSION> # for LabVIEW

How to use — Podman (unchanged)

podman load -i build/tmp-glibc/deploy/images/x64/nilrt-slim-container-11.5-slim-oci.tar
podman load -i build/tmp-glibc/deploy/images/x64/nilrt-runmode-container-11.5-oci.tar
podman tag localhost/11.5:latest nilrt:11.5
podman tag localhost/11.5-slim:latest nilrt:11.5-slim
podman run -it nilrt:11.5
podman run -it nilrt:11.5-slim
podman run --privileged --network=host -it nilrt:11.5 # for LabVIEW.

Justification

AB#3756158.

Testing

  • Built both container images; .docker.tar produced and docker load -i loads the image with correct name and tag.
  • Verified inside Docker container:
    • cat /etc/os-release | grep VARIANT → VARIANT_ID=container
    • whoami → root (slim container, no NIAuth)
    • whoami→ admin (runmode container)
    • cat /boot/grub/grubenv → synthetic PXI grubenv with serial#=ABCDEFG
    • opkg update → package manager connects and refreshes feeds
  • Compared filesystem contents between podman (OCI tar) and Docker (docker-archive tar) containers — they are identical.

Add image-oci-docker.bbclass that converts OCI image archives to
docker-archive format using skopeo-native. This produces a tar that
can be loaded directly with `docker load -i` without requiring
skopeo on the host.

Signed-off-by: Shreejit C <shreejit.c@emerson.com>
@Shreejit-03 Shreejit-03 requested review from a team and rajendra-desai-ni April 3, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant