Better show image info in HTML
- each image in a new line - only show up to seconds in date
This commit is contained in:
@@ -1113,22 +1113,18 @@ class Containerize():
|
||||
else:
|
||||
time.sleep(10)
|
||||
|
||||
imagesInfo = ''
|
||||
html_cell = ''
|
||||
for newCont in newContainers:
|
||||
if newCont == 'rfsim4g-db-init':
|
||||
continue
|
||||
cmd = 'docker inspect -f "{{.Config.Image}}" ' + newCont
|
||||
imageInspect = myCmd.run(cmd, timeout=30, silent=True)
|
||||
imageName = str(imageInspect.stdout).strip()
|
||||
cmd = 'docker image inspect --format "{{.RepoTags}}\t{{.Size}} bytes\t{{.Created}}\t{{.Id}}" ' + imageName
|
||||
cmd = 'docker image inspect --format \'{{.RepoTags}}\t{{.Size}} bytes\t{{index (split .Created ".") 0}}\n{{.Id}}\' ' + imageName
|
||||
imageInspect = myCmd.run(cmd, 30, silent=True)
|
||||
imagesInfo += imageInspect.stdout.strip()
|
||||
html_cell += imageInspect.stdout + '\n'
|
||||
myCmd.close()
|
||||
|
||||
html_cell = ''
|
||||
for imageInfo in imagesInfo.split('\n'):
|
||||
html_cell += imageInfo[:-11] + '\n'
|
||||
html_cell += '\n'
|
||||
for cState in containerStatus:
|
||||
html_cell += cState + '\n'
|
||||
if count == 100 and healthy == self.nb_healthy[0]:
|
||||
|
||||
Reference in New Issue
Block a user