Skip to content

Commit

Permalink
Fix build manifest image size and improve name
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru committed Oct 20, 2023
1 parent 2a6a10a commit 848a826
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tagging/manifests.py
Expand Up @@ -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()
Expand All @@ -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:",
Expand Down

0 comments on commit 848a826

Please sign in to comment.