Open
Description
File: engine/reference/commandline/build.md
The documentation about docker build's "-f" flag mentions the following:
If a relative path is specified then it is interpreted as relative to the root of the context.
This is false and misleading. It looks like if a relative path is specified, it is searched as being relative to the current directory, not the root of the context.
An example of the correct usage is also on the same page, when it mentions that the two docker build commands do the same thing:
$ cd /home/me/myapp/some/dir/really/deep
$ docker build -f /home/me/myapp/dockerfiles/debug /home/me/myapp
$ docker build -f ../../../../dockerfiles/debug /home/me/myapp
It is visible there that the second docker build uses a relative path that is relative to the current directory, not the root of the context.