mirror of https://github.com/docker/compose.git
Use same tag as service definition
Signed-off-by: Boris HUISGEN <bhuisgen@hbis.fr>
This commit is contained in:
parent
0fb6cd1139
commit
a2ec572fdf
|
@ -579,6 +579,14 @@ class TopLevelCommand(object):
|
||||||
rows = []
|
rows = []
|
||||||
for container in containers:
|
for container in containers:
|
||||||
image_config = container.image_config
|
image_config = container.image_config
|
||||||
|
service = self.project.get_service(container.service)
|
||||||
|
if service.image_name in image_config['RepoTags']:
|
||||||
|
index = image_config['RepoTags'].index(service.image_name)
|
||||||
|
repo_tags = (
|
||||||
|
image_config['RepoTags'][index].rsplit(':', 1) if image_config['RepoTags']
|
||||||
|
else ('<none>', '<none>')
|
||||||
|
)
|
||||||
|
else:
|
||||||
repo_tags = (
|
repo_tags = (
|
||||||
image_config['RepoTags'][0].rsplit(':', 1) if image_config['RepoTags']
|
image_config['RepoTags'][0].rsplit(':', 1) if image_config['RepoTags']
|
||||||
else ('<none>', '<none>')
|
else ('<none>', '<none>')
|
||||||
|
|
Loading…
Reference in New Issue