diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2022-08-16 18:30:19 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2022-08-16 19:45:36 -0400 |
commit | 7e7a79b075f7d65657d95169f02c2c1c03198b93 (patch) | |
tree | 128361ac50f61f62b3dd6b9ba205cd54871e0605 /pkg/domain/infra/abi/manifest.go | |
parent | 3aa92010dfd56fcc674fb998ad2d8551acf0cba9 (diff) | |
download | podman-7e7a79b075f7d65657d95169f02c2c1c03198b93.tar.gz podman-7e7a79b075f7d65657d95169f02c2c1c03198b93.tar.bz2 podman-7e7a79b075f7d65657d95169f02c2c1c03198b93.zip |
podman manifest create: accept --amend and --insecure flags
Accept a --amend flag in `podman manifest create`, and treat
`--insecure` as we would `--tls-verify=false` in `podman manifest`'s
"add", "create", and "push" subcommands.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'pkg/domain/infra/abi/manifest.go')
-rw-r--r-- | pkg/domain/infra/abi/manifest.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/manifest.go b/pkg/domain/infra/abi/manifest.go index e0c11267e..7e8c86526 100644 --- a/pkg/domain/infra/abi/manifest.go +++ b/pkg/domain/infra/abi/manifest.go @@ -32,7 +32,15 @@ func (ir *ImageEngine) ManifestCreate(ctx context.Context, name string, images [ manifestList, err := ir.Libpod.LibimageRuntime().CreateManifestList(name) if err != nil { - return "", err + if errors.Is(err, storage.ErrDuplicateName) && opts.Amend { + amendList, amendErr := ir.Libpod.LibimageRuntime().LookupManifestList(name) + if amendErr != nil { + return "", err + } + manifestList = amendList + } else { + return "", err + } } addOptions := &libimage.ManifestListAddOptions{All: opts.All} |