summaryrefslogtreecommitdiff
path: root/contrib/python/podman
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2018-06-01 10:03:54 -0700
committerJhon Honce <jhonce@redhat.com>2018-06-01 10:03:54 -0700
commit80baf0d8009994c34f5bf807a1126093046536bc (patch)
treea531f7c138e9761a74f5a5622f8492f27168c977 /contrib/python/podman
parent3f29e3e88110fd1a1c0b7d2058aa2c89dbb89c40 (diff)
downloadpodman-80baf0d8009994c34f5bf807a1126093046536bc.tar.gz
podman-80baf0d8009994c34f5bf807a1126093046536bc.tar.bz2
podman-80baf0d8009994c34f5bf807a1126093046536bc.zip
Fix lable handling
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'contrib/python/podman')
-rw-r--r--contrib/python/podman/libs/images.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/python/podman/libs/images.py b/contrib/python/podman/libs/images.py
index d617a766b..f28cb64aa 100644
--- a/contrib/python/podman/libs/images.py
+++ b/contrib/python/podman/libs/images.py
@@ -1,5 +1,6 @@
"""Models for manipulating images in/to/from storage."""
import collections
+import copy
import functools
import json
@@ -45,12 +46,12 @@ class Image(collections.UserDict):
with self._client() as podman:
details = self.inspect()
- # TODO: remove network settings once defaults implemented on service side
+ # TODO: remove network settings once defaults implemented in service
config = Config(image_id=self.id, **kwargs)
config['command'] = details.containerconfig['cmd']
config['env'] = self._split_token(details.containerconfig['env'])
- config['image'] = details.repotags[0]
- config['labels'] = self._split_token(details.labels)
+ config['image'] = copy.deepcopy(details.repotags[0])
+ config['labels'] = copy.deepcopy(details.labels)
config['net_mode'] = 'bridge'
config['network'] = 'bridge'
config['work_dir'] = '/tmp'