Parameter -f
changes the name of the Dockerfile (when it's different than regular Dockerfile
). It is not for passing the full path to docker build
. The path goes as the first argument.
Syntax is:
docker build [PARAMS] PATH
So in your case, this should work:
docker build -f MyDockerfile -t proj:myapp /full/path/to/
or in case you are in the project directory, you just need to use a dot:
docker build -f MyDockerfile -t proj:myapp .
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…