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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With