Description
When running ecloud compute app deploy and selecting an image destination, Docker Hub registries appear multiple times if ~/.docker/config.json contains multiple URL variants for the same registry (e.g., docker.io, index.docker.io, https://index.docker.io/v1/).
Example output:
Detected authenticated registries:
dockerhub: mattmurrs/dev-test:latest
dockerhub: mattmurrs/dev-test:latest
dockerhub: mattmurrs/dev-test:latest
? Select image destination:
❯ mattmurrs/dev-test:latest
mattmurrs/dev-test:latest
mattmurrs/dev-test:latest
Enter custom image reference
Root Cause
In packages/cli/src/utils/prompts.ts, getAvailableRegistries() deduplicates GCR entries using a Map (keyed by username), but Docker Hub and GHCR entries are pushed directly to the array without deduplication. Each auths entry in the Docker config that resolves to Docker Hub produces a separate registry entry.
Expected Behavior
Only one entry per unique registry type + username combination should appear in the picker.
Suggested Fix
Apply the same Map-based deduplication used for GCR to Docker Hub and GHCR entries (e.g., key by registryType:username).
Description
When running
ecloud compute app deployand selecting an image destination, Docker Hub registries appear multiple times if~/.docker/config.jsoncontains multiple URL variants for the same registry (e.g.,docker.io,index.docker.io,https://index.docker.io/v1/).Example output:
Root Cause
In
packages/cli/src/utils/prompts.ts,getAvailableRegistries()deduplicates GCR entries using a Map (keyed by username), but Docker Hub and GHCR entries are pushed directly to the array without deduplication. Eachauthsentry in the Docker config that resolves to Docker Hub produces a separate registry entry.Expected Behavior
Only one entry per unique registry type + username combination should appear in the picker.
Suggested Fix
Apply the same Map-based deduplication used for GCR to Docker Hub and GHCR entries (e.g., key by
registryType:username).