Skip to content

Feature: manifest create --amend or --replace with non-list #6639

@c-kruse

Description

@c-kruse

Feature request

When I have an image in local storage (built or pulled as a regular image) it is cumbersome to then create a manifest with that name. I would prefer have options on manifest create to either convert the existing non-list image into a manifest or to untag the conflicting image (list or non-list alike?)

ex:

$ buildah build -t myrepo.local/test:v1 .
...
Writing manifest to image destination
--> bf88f9442771
Successfully tagged myrepo.local/test:v1
bf88f9442771cce6d2c1522311db10252c7f102f216cc4e49ecdd77b596f6bef
$ buildah manifest create myrepo.local/test:v1
Error: image name "myrepo.local/test:v1" is already associated with image "bf88f9442771cce6d2c1522311db10252c7f102f216cc4e49ecdd77b596f6bef": that name is already in use
$ buildah tag myrepo.local/test:v1 myrepo.local/test:tmp-v1
$ buildah rmi myrepo.local/test:v1
untagged: myrepo.local/test:v1
$ buildah manifest create myrepo.local/test:v1 myrepo.local/test:tmp-v1
d2091e4afbbdd96d55acab5ef15fe54e25a8b271782276f31dd010dfb41945f3

Suggested approach

Extend the buildah manifest create (and podman manifest create) command with two flags for handling name conflicts with non-list images:

  • Expand --amend to convert a non-list image with the desired manifest name into a list.
  • Add --replace to remove an image with the desired name before creating the manifest.

Context

I started here: containers/podman#24537

Prior relevant work: containers/common#2091

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions