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,10 +579,18 @@ class TopLevelCommand(object):
|
||||||
rows = []
|
rows = []
|
||||||
for container in containers:
|
for container in containers:
|
||||||
image_config = container.image_config
|
image_config = container.image_config
|
||||||
repo_tags = (
|
service = self.project.get_service(container.service)
|
||||||
image_config['RepoTags'][0].rsplit(':', 1) if image_config['RepoTags']
|
if service.image_name in image_config['RepoTags']:
|
||||||
else ('<none>', '<none>')
|
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 = (
|
||||||
|
image_config['RepoTags'][0].rsplit(':', 1) if image_config['RepoTags']
|
||||||
|
else ('<none>', '<none>')
|
||||||
|
)
|
||||||
image_id = image_config['Id'].split(':')[1][:12]
|
image_id = image_config['Id'].split(':')[1][:12]
|
||||||
size = human_readable_file_size(image_config['Size'])
|
size = human_readable_file_size(image_config['Size'])
|
||||||
rows.append([
|
rows.append([
|
||||||
|
|
Loading…
Reference in New Issue