[build] Incompatibility between end-of-command PATH and target relatively a Dockerfile with -f
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- docker, go
- Ambito
- cli, documentation
Direzione di ricerca
Inizia riproducendo docker build -f Dockerfile subdirectory sia con il builder legacy sia con BuildKit, quindi esamina la formulazione della documentazione e della pagina man di docker build relativa a PATH e alla posizione di Dockerfile. Il lavoro è completato quando il comando funziona come descritto oppure la documentazione spiega chiaramente la limitazione e l’utilizzo corretto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
docker build allows to provide a PATH at the end of the command to locate the Dockerfile there, or to target a Dockerfile with - f.
Reading at the documentation/manpage, it leads to think PATH becomes the working directory, and as such if we combine both we could use -f to target the Dockerfile relatively to PATH.
Reproduce
Picture this structure:
repo_root
|___subdirectory
|____Dockerfile
One would expect here that we could be at repo_root and run docker build -f Dockerfile subdirectory as Dockerfile is at current location (.) when starting from subdirectory.
That's what lead to think the manpage.
The result however is this: ERROR: failed to build: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
Note that although the error message is different, the issue exist for both legacy builder and BuildKit.
Expected behavior
The example given above should work, or if it's expected that it doesn't, the manpage might need a little rewording.
docker version
What's provided in GitHub Actions context first, then reproduced on an ArchLinux computer I don't have at hand to paste the block. Docker 29.8.0 on Arch (https://archlinux.org/packages/extra/x86_64/docker/) reproduced with legacy builder and BuildKit one (https://archlinux.org/packages/extra/x86_64/docker-buildx/)
docker info
Same as above, don't need to have the build running anyway.
Additional Info
No response
- Lingua principale
- Go
- Stelle
- 6.1k
- Fork
- 2.2k
- Merge medio
- 1g 15h
- PR unite (30g)
- 43
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 docker/cli
-
kind/bug status/0-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
kind/feature status/0-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
kind/bug status/0-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
kind/bug status/0-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
-
enhancement needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
kind/cleanup
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sympozium-ai/sympozium#627 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100