Skip to content

docs(man): clarify -f is relative to the working directory - #7330

Open
TastyHeadphones wants to merge 1 commit into
docker:masterfrom
TastyHeadphones:docs/build-file-relative-to-cwd
Open

TastyHeadphones wants to merge 1 commit into
docker:masterfrom
TastyHeadphones:docs/build-file-relative-to-cwd

Conversation

@TastyHeadphones

Copy link
Copy Markdown

The build man page said a relative -f path was relative to the context PATH. The client actually resolves it from the current working directory (GetContextFromLocalDir), which is why docker build -f Dockerfile subdir looks for ./Dockerfile rather than subdir/Dockerfile.

Updated the man page to match that and added a short example.

Fixes #7309

The build man page said a relative -f path was relative to the context
PATH. GetContextFromLocalDir resolves it from the current working
directory instead. Spell that out with an example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[build] Incompatibility between end-of-command PATH and target relatively a Dockerfile with -f

1 participant