root@debian:/tdsk1/dkfile/ubuntu_server# docker build -t test/ubuntu -f test/Dockerfile
docker: “build” requires 1 argument. See ‘docker build –help’.
Dock build-t test/ubuntutest can be used
What are the specific uses of the -f option? Why can’t I use it?
It is not that they cannot be used
-f
You missed the parameter.docker build
You need to pass in a directory as a parameter. This directory isdocker build
Thecontext
, that is, the environment directory in the process of construction, forADD
A class of commands are based on the relative host directory when using it.
If we didn’t pass in-f
To defineDockerfile
The location of the, will also default to query in this directory. But it was not introduced-f
, you can omit the that defines the environment directory parameter.