Layr-Labs / Layr-Labs/ecloud

Registry deduplication: duplicate Docker Hub entries in image destination picker

Open Beginner friendly
#93 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7
Forks
3
PR merge metrics
No merged PRs in 30d

Description

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).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/cli/src/utils/prompts.ts and read getAvailableRegistries(), comparing the existing GCR Map deduplication with the Docker Hub and GHCR paths. Use Docker config entries with equivalent registry URL variants to verify that the image destination picker shows one entry per registry type and username.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.