I am new to Docker and i am trying to create an image from my application, i created Dockerfile
in the same directory with package.json
file with no extension, just Dockerfile
Now in Dockerfile
:
FROM node:14.16.0
CMD ["/bin/bash"]
and i am trying to build the image with that command
docker build -t app .
But i got this constant error:
[+] Building 0.2s (2/2) FINISHED
=> [internal] load build definition from Dockerfile 0.2s
=> => transferring dockerfile: 2B 0.0s
=> CANCELED [internal] load .dockerignore 0.0s
=> => transferring context: 0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount457647683/Dockerfile: no such file or directory
My folder directory is like this:
|- Dockerfile
|- README.md
|- src
|- package.json
|- public
|- node-modules
|-package-lock.json
My OS is : Windows 10 Pro