summaryrefslogtreecommitdiff
path: root/libpod/adapter/runtime_remote.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-13 09:34:33 -0800
committerGitHub <noreply@github.com>2019-01-13 09:34:33 -0800
commit140ae25c4d0c7ba89a0bb7ae16f81f90d20be535 (patch)
treea5e30854d0669694556fdde8de43e00d30176d9c /libpod/adapter/runtime_remote.go
parent9ada9722ecba373b317e1ab3e9adf716fc777d8d (diff)
parent43c6da22b976b6050f86dca50564a4c2b08caee0 (diff)
downloadpodman-140ae25c4d0c7ba89a0bb7ae16f81f90d20be535.tar.gz
podman-140ae25c4d0c7ba89a0bb7ae16f81f90d20be535.tar.bz2
podman-140ae25c4d0c7ba89a0bb7ae16f81f90d20be535.zip
Merge pull request #2141 from baude/remotetag
Add darwin support for remote-client
Diffstat (limited to 'libpod/adapter/runtime_remote.go')
-rw-r--r--libpod/adapter/runtime_remote.go18
1 files changed, 15 insertions, 3 deletions
diff --git a/libpod/adapter/runtime_remote.go b/libpod/adapter/runtime_remote.go
index 2f22dd36b..0fe5c449a 100644
--- a/libpod/adapter/runtime_remote.go
+++ b/libpod/adapter/runtime_remote.go
@@ -66,6 +66,7 @@ type remoteImage struct {
Names []string
Digest digest.Digest
isParent bool
+ Runtime *LocalRuntime
}
// GetImages returns a slice of containerimages over a varlink connection
@@ -80,7 +81,7 @@ func (r *LocalRuntime) GetImages() ([]*ContainerImage, error) {
if len(i.RepoTags) > 1 {
name = i.RepoTags[0]
}
- newImage, err := imageInListToContainerImage(i, name)
+ newImage, err := imageInListToContainerImage(i, name, r)
if err != nil {
return nil, err
}
@@ -89,7 +90,7 @@ func (r *LocalRuntime) GetImages() ([]*ContainerImage, error) {
return newImages, nil
}
-func imageInListToContainerImage(i iopodman.ImageInList, name string) (*ContainerImage, error) {
+func imageInListToContainerImage(i iopodman.ImageInList, name string, runtime *LocalRuntime) (*ContainerImage, error) {
imageParts, err := image.DecomposeString(name)
if err != nil {
return nil, err
@@ -111,6 +112,7 @@ func imageInListToContainerImage(i iopodman.ImageInList, name string) (*Containe
Repository: imageParts.Registry,
Names: i.RepoTags,
isParent: i.IsParent,
+ Runtime: runtime,
}
return &ContainerImage{ri}, nil
}
@@ -121,7 +123,7 @@ func (r *LocalRuntime) NewImageFromLocal(name string) (*ContainerImage, error) {
if err != nil {
return nil, err
}
- return imageInListToContainerImage(img, name)
+ return imageInListToContainerImage(img, name, r)
}
@@ -173,3 +175,13 @@ func (ci *ContainerImage) Labels(ctx context.Context) (map[string]string, error)
func (ci *ContainerImage) Dangling() bool {
return len(ci.Names()) == 0
}
+
+// TagImage ...
+func (ci *ContainerImage) TagImage(tag string) error {
+ _, err := iopodman.TagImage().Call(ci.Runtime.Conn, ci.ID(), tag)
+ return err
+}
+
+func (r RemoteRuntime) RemoveImage(force bool) error {
+ return nil
+}