diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-01 16:10:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-01 16:10:10 +0200 |
commit | 82cbebcbea7f92be7e82bc11fdf1b30d7e194cdc (patch) | |
tree | b819be57459895e73ebcd0ae8a1b204df7ba4849 /pkg/bindings | |
parent | 394f1c26d61cc8570b49444e1f431978bf101daa (diff) | |
parent | 26644d7cb85d5935bb59c7891ac9a81d6092673c (diff) | |
download | podman-82cbebcbea7f92be7e82bc11fdf1b30d7e194cdc.tar.gz podman-82cbebcbea7f92be7e82bc11fdf1b30d7e194cdc.tar.bz2 podman-82cbebcbea7f92be7e82bc11fdf1b30d7e194cdc.zip |
Merge pull request #5656 from baude/v2imagetag
podman v2 image tag and untag
Diffstat (limited to 'pkg/bindings')
-rw-r--r-- | pkg/bindings/images/images.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/bindings/images/images.go b/pkg/bindings/images/images.go index 5f5c4443f..9ef85b955 100644 --- a/pkg/bindings/images/images.go +++ b/pkg/bindings/images/images.go @@ -197,6 +197,22 @@ func Tag(ctx context.Context, nameOrID, tag, repo string) error { return response.Process(nil) } +// Untag removes a name from locally-stored image. Both the tag and repo parameters are required. +func Untag(ctx context.Context, nameOrID, tag, repo string) error { + conn, err := bindings.GetClient(ctx) + if err != nil { + return err + } + params := url.Values{} + params.Set("tag", tag) + params.Set("repo", repo) + response, err := conn.DoRequest(nil, http.MethodPost, "/images/%s/untag", params, nameOrID) + if err != nil { + return err + } + return response.Process(nil) +} + func Build(nameOrId string) {} // Imports adds the given image to the local image store. This can be done by file and the given reader |