mirror of
https://github.com/containers/podman.git
synced 2025-06-20 09:03:43 +08:00
Fix lable handling
Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
@ -13,3 +13,4 @@ clean:
|
|||||||
$(PYTHON) setup.py clean --all
|
$(PYTHON) setup.py clean --all
|
||||||
rm -rf podman.egg-info dist
|
rm -rf podman.egg-info dist
|
||||||
find . -depth -name __pycache__ -exec rm -rf {} \;
|
find . -depth -name __pycache__ -exec rm -rf {} \;
|
||||||
|
find . -depth -name \*.pyc -exec rm -f {} \;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""Models for manipulating images in/to/from storage."""
|
"""Models for manipulating images in/to/from storage."""
|
||||||
import collections
|
import collections
|
||||||
|
import copy
|
||||||
import functools
|
import functools
|
||||||
import json
|
import json
|
||||||
|
|
||||||
@ -45,12 +46,12 @@ class Image(collections.UserDict):
|
|||||||
with self._client() as podman:
|
with self._client() as podman:
|
||||||
details = self.inspect()
|
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 = Config(image_id=self.id, **kwargs)
|
||||||
config['command'] = details.containerconfig['cmd']
|
config['command'] = details.containerconfig['cmd']
|
||||||
config['env'] = self._split_token(details.containerconfig['env'])
|
config['env'] = self._split_token(details.containerconfig['env'])
|
||||||
config['image'] = details.repotags[0]
|
config['image'] = copy.deepcopy(details.repotags[0])
|
||||||
config['labels'] = self._split_token(details.labels)
|
config['labels'] = copy.deepcopy(details.labels)
|
||||||
config['net_mode'] = 'bridge'
|
config['net_mode'] = 'bridge'
|
||||||
config['network'] = 'bridge'
|
config['network'] = 'bridge'
|
||||||
config['work_dir'] = '/tmp'
|
config['work_dir'] = '/tmp'
|
||||||
|
Reference in New Issue
Block a user