Skip to content

build: add support for -t/--tag switch#105

Merged
jlebon merged 1 commit intomainfrom
podman-tag
Apr 9, 2026
Merged

build: add support for -t/--tag switch#105
jlebon merged 1 commit intomainfrom
podman-tag

Conversation

@jlebon
Copy link
Copy Markdown
Member

@jlebon jlebon commented Apr 9, 2026

In the podman run chunkah | podman load flow for splitting an existing image, it's annoying that the resulting image is unnamed. Add support for a -t/--tag switch which sets the right annotation on the manifest descriptor in the OCI archive that e.g. podman and docker pay attention to.

While we're here, update the Docker docs; the containerd backend does support OCI archives natively and that's the default backend nowadays. So that simplifies things nicely and makes it almost identical to the podman instructions.

Assisted-by: OpenCode (Claude Opus 4.6)

In the `podman run chunkah | podman load` flow for splitting an existing
image, it's annoying that the resulting image is unnamed. Add support
for a `-t`/`--tag` switch which sets the right annotation on the
manifest descriptor in the OCI archive that e.g. `podman` and `docker`
pay attention to.

While we're here, update the Docker docs; the containerd backend does
support OCI archives natively and that's the default backend nowadays.
So that simplifies things nicely and makes it almost identical to the
podman instructions.

Assisted-by: OpenCode (Claude Opus 4.6)
@jlebon jlebon merged commit dc805a6 into main Apr 9, 2026
10 checks passed
@jlebon jlebon deleted the podman-tag branch April 9, 2026 03:02
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new -t/--tag option for the chunkah build command, allowing users to specify a tag for the generated OCI image archive. This tag is then utilized by podman load and docker load to automatically tag the loaded image, simplifying the image loading workflow. The README.md has been updated to reflect this new functionality, including details on Docker's containerd image store requirements. The implementation involves adding the tag argument to the BuildArgs struct, passing it to the Builder, and updating the ocibuilder to set the org.opencontainers.image.ref.name annotation on the manifest descriptor. The end-to-end tests have also been updated to use this new tagging functionality. The review comments suggest an improvement to the Builder::tag method to accept a &str instead of String to avoid unnecessary string cloning and improve performance, aligning with idiomatic Rust practices.

Comment thread src/cmd_build.rs
Comment thread src/ocibuilder.rs
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