build rejects valid tag@digest image references during registry inspection
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- docker, typescript
Direzione di ricerca
Start in src/spec-configuration/containerCollectionsOCI.ts, especially getRef and inspectImageInRegistry, then run the provided devcontainer build reproduction for the direct image and Dockerfile FROM cases. Done means valid name:tag@sha256:digest references pass registry inspection while digest-only references continue to work.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
@devcontainers/cli 0.89.0 rejects valid OCI/Docker name:tag@sha256:digest references during registry inspection. This reproduces for both a direct devcontainer.json.image and a Dockerfile FROM. The equivalent digest-only reference works.
This is related to #825, but that report is limited to Feature identifiers and explicitly says ordinary image references accept tag plus digest.
Environment
@devcontainers/cli: 0.89.0- Node.js: 26.9.0
- OS: Linux 7.2.6-1-cachyos x64
- CLI 0.89.0 and current
main:5dc7533314b5ba7ec3875c30143dfe1aec644870
Minimal reproduction
.devcontainer/devcontainer.json:
{
"image": "mcr.microsoft.com/devcontainers/go:2.3.1-1.27-bookworm@sha256:adc326255c019241228f9da4a1cb5d6a89abaaa0eb8d926a355b00af7daafd00"
}
Run:
npx -y @devcontainers/cli@0.89.0 build --workspace-folder . --log-level info
The same failure occurs when a Dockerfile contains a FROM reference in name:tag@digest form.
Actual result
Path 'devcontainers/go:2.3.1-1.27-bookworm' for input 'mcr.microsoft.com/devcontainers/go:2.3.1-1.27-bookworm@sha256:adc326255c019241228f9da4a1cb5d6a89abaaa0eb8d926a355b00af7daafd00' failed validation. Expected path to match regex ...\nError fetching image details: Could not parse image name ...\n```\n\nChanging only the reference to the equivalent digest-only form succeeds:\n\n```text\nmcr.microsoft.com/devcontainers/go@sha256:adc326255c019241228f9da4a1cb5d6a89abaaa0eb8d926a355b00af7daafd00\n```\n\nDocker itself accepts the original tag-plus-digest reference.\n\nIn my two original runs, the CLI also remained alive after printing the parser diagnostic until interrupted with SIGINT. I have not isolated whether that is the fallback `docker pull` path or process cleanup, so the deterministic defect in this report is the parser rejection.\n\n## Expected result\n\n`build` should accept the distribution reference grammar `name [":" tag] ["@" digest]` for direct images and Dockerfile base images.\n\n## Source-level observation\n\n`getRef` removes the digest suffix but leaves `:tag` in `resource` before validating the repository path. The colon then fails the path regex. `inspectImageInRegistry` reports `Could not parse image name`, and both direct-image and Dockerfile inspection reach that path.\n\nReference grammar: https://github.com/distribution/reference/blob/0965666a6ade2e06035fe352e38344be1e68951a/reference.go#L5-L20\n\nRelevant 0.89.0 code: https://github.com/devcontainers/cli/blob/5dc7533314b5ba7ec3875c30143dfe1aec644870/src/spec-configuration/containerCollectionsOCI.ts#L152-L230
- Lingua principale
- TypeScript
- Stelle
- 3k
- Fork
- 461
- Merge medio
- 18m
- PR unite (30g)
- 5
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di devcontainers/cli
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
devcontainers/cli#1203 ·
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
devcontainers/cli#1178 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
devcontainers/cli#1308 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
devcontainers/cli#1305 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
devcontainers/cli#1301 ·
Tutte le issue di devcontainers/cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mksglu/context-mode#1200 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
AOSSIE-Org/DebateAI#582 · 2 commenti ·