Skip to content

Commit

Permalink
Merge branch 'premaster'
Browse files Browse the repository at this point in the history
  • Loading branch information
mfthomps committed Aug 8, 2023
2 parents 4100f1f + 526d915 commit 749dede
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ The installation script and the update-designer.sh script set environment variab
so you may want to logout/login, or start a new bash shell before using Labtainers the
first time.

August 8, 2023
- Handle change to DockerHub image json format. Thanks Kees!

April 17, 2023
- Force use latest lab version, e.g., iptables2 intead of iptables. Fix tab completion to only display latest. (Issue #77)
- CyberCIEGE lab installation was failing due to X11 race condition. (Issue #76)
Expand Down
20 changes: 14 additions & 6 deletions scripts/labtainer-student/bin/InspectRemoteReg.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,22 @@ def getCreated(token, image, digest):
exit(1)
version = None
base = None
if 'container_config' not in j:
if 'container_config' not in j or 'config' not in j:
print('Error getting image information from Docker Hub for %s. Perhaps try again a bit later.' % image)
return None, None, None, None
if 'version' in j['container_config']['Labels']:
version = j['container_config']['Labels']['version']
if 'base' in j['container_config']['Labels']:
base = j['container_config']['Labels']['base']
return j['created'], j['container_config']['User'], version, base
if 'container_config' in j:
if 'version' in j['container_config']['Labels']:
version = j['container_config']['Labels']['version']
if 'base' in j['container_config']['Labels']:
base = j['container_config']['Labels']['base']
return j['created'], j['container_config']['User'], version, base
else:
if 'version' in j['config']['Labels']:
version = j['config']['Labels']['version']
if 'base' in j['config']['Labels']:
base = j['config']['Labels']['base']

return j['created'], j['config']['User'], version, base
else:
return None, None, None, None

0 comments on commit 749dede

Please sign in to comment.