2

Windows PowerShell:

PS C:\Users\Administrator> docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
alpine              latest              d6e46aa2470d        13 days ago         5.57MB
alpine/git          latest              a8b6c5c0eb62        2 weeks ago         28.4MB

PS C:\Users\Administrator> docker build C:\dfiles
[+] Building 0.9s (2/2) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.6s
 => => transferring dockerfile: 2B                                                                                 0.0s
 => [internal] load .dockerignore                                                                                  0.8s
 => => transferring context: 2B                                                                                    0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount632819289/Dockerfile: no such file or directory

The path of where the dockerfile is stored: C:\dfiles

The code in my Dockerfile.txt:

FROM alpine
CMD ["echo", "Hello StackOverflow!"]
tgogos
  • 23,218
  • 20
  • 96
  • 128
Frankosh
  • 21
  • 1
  • 2
    Does this answer your question? [Failed To Resolve With FrontEnd DockerFIle.v0](https://stackoverflow.com/questions/64221861/failed-to-resolve-with-frontend-dockerfile-v0) If your Dockerfile is really called `Dockerfile.txt` this could be the issue – derpirscher Nov 04 '20 at 11:03

2 Answers2

3

Simple

Use just Dockerfile with no Extention instead of Dockerfile.txt

Zain Ur Rehman
  • 287
  • 3
  • 14
1

The code in my Dockerfile.txt

The file needs to be called "Dockerfile", not "Dockerfile.txt". So remove the file extension from your file and try again.

Simon
  • 4,251
  • 2
  • 24
  • 34