Skip to content

Conversation

colinmoynes
Copy link
Collaborator

📄 Summary

Added Docker multi-arch script.

@Copilot Copilot AI review requested due to automatic review settings September 19, 2025 14:00
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a Docker multi-architecture inspector tool to help analyze Docker images stored in Cloudsmith repositories. The tool provides hierarchical breakdown of images by tag, showing manifest digests, platform information, sync status, and download counts.

  • Added a shell script that inspects Docker multi-arch images via Cloudsmith APIs
  • Provides download count aggregation across all manifests for complete image statistics
  • Updates repository README to reflect its new purpose as a support engineering resource collection

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 10 comments.

File Description
README.md Updated repository description from template to support engineering resources
Docker/Multi-Arch-Inspector/run.sh Main shell script for inspecting Docker multi-arch images
Docker/Multi-Arch-Inspector/README.md Documentation explaining the multi-arch inspector tool usage

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

CLOUDSMITH_URL="https://docker.cloudsmith.io"
fi

# uthorization header
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: 'uthorization' should be 'Authorization'

Suggested change
# uthorization header
# Authorization header

Copilot uses AI. Check for mistakes.

case ${LC_ALL:-${LC_CTYPE:-$LANG}} in *UTF-8*|*utf8*) : ;; *) CHECK='OK'; CROSS='X' ;; esac

completed() { printf '%s%s%s %s\n' "$GREEN" "$CHECK" "$RESET" "$*"; }
progress() { printf '%s%s%s %s\n' "$YELLOW" "$TIMER" "$RESET" "$*"; }
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable YELLOW is referenced but never defined. This will cause the progress function to output empty color codes.

Copilot uses AI. Check for mistakes.


completed() { printf '%s%s%s %s\n' "$GREEN" "$CHECK" "$RESET" "$*"; }
progress() { printf '%s%s%s %s\n' "$YELLOW" "$TIMER" "$RESET" "$*"; }
quarantined() { printf '%s%s%s %s\n' "$ORANGE" "$VULN" "$RESET" "$*"; }
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable ORANGE is referenced but never defined. This will cause the quarantined function to output empty color codes.

Copilot uses AI. Check for mistakes.

;;

Failed)
echo " |____ Status: ${STATUS[0]} ${FAIL}"
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable FAIL is referenced but never defined. This should be CROSS based on the other status display patterns.

Copilot uses AI. Check for mistakes.

;;

Failed)
echo " |____ Status: ${STATUS[1]} ${FAIL}"
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable FAIL is referenced but never defined. This should be CROSS based on the other status display patterns.

Copilot uses AI. Check for mistakes.

getDockerDigests () {

local nTAG="$1"
local totalDownloads=0
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The totalDownloads variable is declared as local inside getDockerDigests function but is being incremented inside the nested getPackageData function where it's not accessible. This will always show 0 downloads.

Copilot uses AI. Check for mistakes.

getDigestData "${DIGESTS[i]}"
echo
done
echo " |___ Total Downloads: ${totalDownloads}"
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The totalDownloads variable is declared as local inside getDockerDigests function but is being incremented inside the nested getPackageData function where it's not accessible. This will always show 0 downloads.

Copilot uses AI. Check for mistakes.


<img src="example.gif" width=50%>

## Prequisities
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in heading: 'Prequisities' should be 'Prerequisites'

Suggested change
## Prequisities
## Prerequisites

Copilot uses AI. Check for mistakes.


## How to use

Execute run.sh and pass in 4 arguements ( domain, org, repo and image name).
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: 'arguements' should be 'arguments'

Suggested change
Execute run.sh and pass in 4 arguements ( domain, org, repo and image name).
Execute run.sh and pass in 4 arguments ( domain, org, repo and image name).

Copilot uses AI. Check for mistakes.

# Docker Multi-Arch images overview script

The script will return an overview of your Docker multi-arch images stored in your Cloudsmith repository.
It provides a hierarchial breakdown of each image by tag, showing the index digest and it's associated manifest digests with their platform, cloudsmith sync status and downloads count.
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: 'hierarchial' should be 'hierarchical'

Suggested change
It provides a hierarchial breakdown of each image by tag, showing the index digest and it's associated manifest digests with their platform, cloudsmith sync status and downloads count.
It provides a hierarchical breakdown of each image by tag, showing the index digest and it's associated manifest digests with their platform, cloudsmith sync status and downloads count.

Copilot uses AI. Check for mistakes.

@colinmoynes colinmoynes merged commit b2d3c8a into main Sep 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant