devcontainers / devcontainers/cli
Add support for Dockerfile using a variable within their FROM line, today it fails due to usage of docker inspect not handling the ARG
- Lingua principale
- TypeScript
- Stelle
- 3k
- Fork
- 457
- Merge medio
- 13h 17m
- PR unite (30g)
- 6
Descrizione
I have a Dockerfile that needs to use an ARG in the FROM line:
https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
```
ARG VERSION=latest
FROM busybox:$VERSION
ARG VERSION
```
This works with docker build but fails with devcontainer because devcontainers try to build the FROM image name without honoring the ARG and call docker inspect which then return a failure.
```
[126 ms] @devcontainers/cli 0.52.1. Node.js v18.18.2. linux 5.15.0-86-generic x64.
{"outcome":"error","message":"Command failed: docker inspect --type image busybox:VERSION","description":"An error occurred building the container."}
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by reproducing the provided Dockerfile with the devcontainers CLI and inspect the path that invokes `docker inspect --type image`. Use the Dockerfile example and Docker’s ARG/FROM behavior as the acceptance case: the image reference must be resolved without the `busybox:VERSION` failure, while ordinary FROM lines continue to build successfully.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, typescript
- Ambito
- build-system, cli
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100