images: add docker-archive output for containers#984
Open
Shreejit-03 wants to merge 1 commit intoni:nilrt/master/nextfrom
Open
images: add docker-archive output for containers#984Shreejit-03 wants to merge 1 commit intoni:nilrt/master/nextfrom
Shreejit-03 wants to merge 1 commit intoni:nilrt/master/nextfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-containerbitbake nilrt-runmode-containerHow to use — Docker
docker load -i build/tmp-glibc/deploy/images/x64/nilrt-slim-container-<VERSION>-slim-docker.tardocker load -i build/tmp-glibc/deploy/images/x64/nilrt-runmode-container-<VERSION>-docker.tardocker run -it nilrt-slim-container:<VERSION>-slimdocker run -it nilrt-runmode-container:<VERSION>docker run --privileged --network=host -it nilrt-runmode-container:<VERSION># for LabVIEWHow to use — Podman (unchanged)
podman load -i build/tmp-glibc/deploy/images/x64/nilrt-slim-container-11.5-slim-oci.tarpodman load -i build/tmp-glibc/deploy/images/x64/nilrt-runmode-container-11.5-oci.tarpodman tag localhost/11.5:latest nilrt:11.5podman tag localhost/11.5-slim:latest nilrt:11.5-slimpodman run -it nilrt:11.5podman run -it nilrt:11.5-slimpodman run --privileged --network=host -it nilrt:11.5# for LabVIEW.Justification
AB#3756158.
Testing
docker load -iloads the image with correct name and tag.cat /etc/os-release | grep VARIANT→ VARIANT_ID=containerwhoami→ root (slim container, no NIAuth)whoami→ admin (runmode container)cat /boot/grub/grubenv→ synthetic PXI grubenv with serial#=ABCDEFGopkg update→ package manager connects and refreshes feeds