\Dockerfile: The system cannot find the file specified
12,851
The command docker -t build <my docker file name> .
is being misused. It should be:
docker build -t <image-name> -f dockerFile .
where dockerFile
is the name you gave to the Dockerfile.
The -t
option specifies the tag or name to give to the Docker image.
The -f
must be used, if you name the Dockerfile something other than Dockerfile
The .
specifies the docker build context.
Related videos on Youtube
Author by
Mike3355
Updated on October 12, 2022Comments
-
Mike3355 over 1 year
I have created a docker file to use node.js and nginx. When I run
docker -t build <my docker file name> .
I get the following error:Dockerfile: The system cannot find the file specified.
Then in the docker file directory I created a folder name
web
and place my index.html and style.css file in it.Question is: Any idea why I am getting this error?
-
Mike3355 about 6 years@yamenk docker -t build <my docker file name> . is as far as I get
-
tgogos about 6 yearsThe problem is in the command used. The correct is
docker build -t ...
notdocker -t build ...
-
-
Mike3355 about 6 yearsNow I have a bunch of errors in my build. Thanks for the help.