On Fri, Mar 13, 2026 at 4:56 AM Yiding Liu (Fujitsu) <[email protected]> wrote:
> Hi Bruce > I tryed to load image build from meta-virtualization as following > steps. > > 1. Set OCI_IMAGE_TAG to a new value > OCI_IMAGE_TAG = "repo:2.0" > > 2. Load the image > > # podman load -i container-base-repo_2.0-oci.tar > > # podman images > localhost/repo 2.0 > 039d39254c04 14 years ago 5.58 MB > > I found OCI_IMAGE_TAG can specify the image.ref.name for oci image > and loaded by podman, > it will have a format like localhost/repo: 2.0. > > My question is that how to specify the REPOSITORY "localhost" to > another name? > For example > # podman images > buildmachine/repo 2.0 > 039d39254c04 14 years ago 5.58 MB > The short answer is: there's no build time way you can change that, and it isn't a limitation of anything we've done in meta-virt. I ran into this when working through the new mult-layer OCI images and the cross install features. I opted to leave it as-is in those cases, since it is the default behaviour. Both podman and docker prepend localhost/ when loading images that don't have a registry-qualified name. The OCI ref.name annotation in index.json controls the name:tag portion, but the registry prefix is enforced by the runtime: Even if ref.name is buildmachine/repo:2.0, podman shows localhost/buildmachine/repo:2.0 (still prepends localhost because buildmachine doesn't look like a registry — no dots) One workaround is to use a ref that looks like a registry hostname i.e. contains a dot or colon. So set: OCI_IMAGE_TAG = "buildmachine.local/repo:2.0" Which would give buildmachine.local/repo:2.0 in podman. But for arbitrary names without a DNS-style prefix, the simplest approach is to retag after load: podman load -i container-base-repo_2.0-oci.tar podman tag localhost/repo:2.0 buildmachine/repo:2.0 That's what I've planned for some normalization of names, but I haven't done that work yet. So there may be issues lurking that I'm not aware of. 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
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9653): https://lists.yoctoproject.org/g/meta-virtualization/message/9653 Mute This Topic: https://lists.yoctoproject.org/mt/118294206/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
