From 848a8267479239ab1b7e5b6d1e762d63e1b15da8 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Fri, 20 Oct 2023 03:45:03 +0200 Subject: [PATCH] Fix build manifest image size and improve name --- tagging/manifests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tagging/manifests.py b/tagging/manifests.py index a83b20a672..12e98020c3 100644 --- a/tagging/manifests.py +++ b/tagging/manifests.py @@ -30,9 +30,12 @@ def create_header( commit_hash_tag = GitHelper.commit_hash_tag() commit_message = GitHelper.commit_message() + # Unfortunately, docker images doesn't work when specifying `docker.io` as registry + fixed_registry = registry + "/" if registry != "docker.io" else "" + image_size = docker[ "images", - f"{registry}/{owner}/{short_image_name}:latest", + f"{fixed_registry}{owner}/{short_image_name}:latest", "--format", "{{.Size}}", ]().rstrip() @@ -44,7 +47,7 @@ def create_header( "## Build Info", "", f"* Build datetime: {build_timestamp}", - f"* Docker image: {registry}/{owner}/{short_image_name}:{commit_hash_tag}", + f"* Docker image: `{registry}/{owner}/{short_image_name}:{commit_hash_tag}`", f"* Docker image size: {image_size}", f"* Git commit SHA: [{commit_hash}](https://github.com/jupyter/docker-stacks/commit/{commit_hash})", "* Git commit message:",