From 40b74e02b77e83c377fdae83f626f83403b38152 Mon Sep 17 00:00:00 2001
From: Sascha Grunert <sgrunert@suse.com>
Date: Mon, 16 Dec 2019 13:28:16 +0100
Subject: Add `untag` sub-command

Podman now supports untagging images via the `untag` sub-command for the
root and `image` commands. Testing and documentation has been added as
well.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
---
 pkg/adapter/runtime_remote.go | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'pkg/adapter/runtime_remote.go')

diff --git a/pkg/adapter/runtime_remote.go b/pkg/adapter/runtime_remote.go
index fe5cc4fef..9c10b31c0 100644
--- a/pkg/adapter/runtime_remote.go
+++ b/pkg/adapter/runtime_remote.go
@@ -413,6 +413,12 @@ func (ci *ContainerImage) TagImage(tag string) error {
 	return err
 }
 
+// UntagImage removes a single tag from an image
+func (ci *ContainerImage) UntagImage(tag string) error {
+	_, err := iopodman.UntagImage().Call(ci.Runtime.Conn, ci.ID(), tag)
+	return err
+}
+
 // RemoveImage calls varlink to remove an image
 func (r *LocalRuntime) RemoveImage(ctx context.Context, img *ContainerImage, force bool) (*image.ImageDeleteResponse, error) {
 	ir := image.ImageDeleteResponse{}
-- 
cgit v1.2.3-54-g00ecf