0

I am using Windows 10 machine and new to docker technology.

I prepared the Dockerfile.txt file and kept inside the DockerFiles folder in local system.

and executed the below command.

docker build -t my-r-image .

But it is not able to read.

Can anyone please help?

enter image description here

The name is also correct.

Any suggestion will be highly appreciated.

enter image description here

3
  • Dockerfile must be named "Dockerfile" not "Dockerfile.txt", no txt filename extension
    – Setop
    Nov 13, 2020 at 15:13
  • I changed it to Dockerfile still getting the same error.
    – pralhad
    Nov 13, 2020 at 15:55
  • you can try to specify the Dockerfile in the command line using -f Dockerfile
    – Setop
    Nov 13, 2020 at 20:13

1 Answer 1

1

Make sure your dockerfile has the same name as the one shown in your terminal, example:

failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount320670870/Dockerfile: no such file or directory

The dockerfile needs no extension, in Windows, you can create it with notepad++ and save it as "all types (.)"

You can try typing the full path of your dockerfile:

docker build -t X:X O:\Users\yyy\XX
1
  • Thanks alot...saving the Dockerfile in notepad++ worked !!
    – pralhad
    Nov 14, 2020 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.