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
-fYou missed the parameter.
docker buildYou need to pass in a directory as a parameter. This directory is
context, that is, the environment directory in the process of construction, for
ADDA class of commands are based on the relative host directory when using it.
If we didn’t pass in
DockerfileThe 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.