Commit c4f18d9c authored by Hilal Ozdemir's avatar Hilal Ozdemir

convert Docker image config string to dict to obtain User info

parent 7ac58580
......@@ -83,7 +83,7 @@ class K8SImageServicer(ImageServiceServicer):
images = []
for image in DockerImage.select():
uid, username = get_username_or_uid(image.config["User"])
uid, username = get_username_or_uid(json.loads(image.config)["config"]["User"])
images.append(Image(
id=image.hash_id,
......@@ -119,7 +119,7 @@ class K8SImageServicer(ImageServiceServicer):
if request.verbose:
info = {'config': json.dumps(image.config)} # tentatively return config...
uid, username = get_username_or_uid(image.config["User"])
uid, username = get_username_or_uid(json.loads(image.config)["config"]["User"])
response = ImageStatusResponse(image=Image(
id=image.hash_id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment