Expected behavior
Docker image is built using either a file called 'Dockerfile' or 'dockerfile' when a command is typed as:
docker build .
Actual behavior
Docker build command returns an error if the dockerfile is called 'dockerfile' e.g.
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount825383798/Dockerfile: no such file or directory
Workaround:
docker build -f dockerfile .
Information
-
Windows Version: 10.0.19041 Build 19041
-
Docker Desktop Version: 24.0.0
-
Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No
-
Is it reproducible? Yes
-
Is the problem new? yes
-
Did the problem appear with an update? Yes 24.0.0
-
A reproducible case if this is a bug, Dockerfiles with reproduction inside is best.
Any dockerfile using the name 'dockerfile' all lower case
Steps to reproduce the behavior
- name a dockerfile 'dockerfile' all lower case
- try and build with: docker build .
- get an error like
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount582525092/Dockerfile: no such file or directory
- try instead with: docker build -f dockerfile .
- watch it succeed
I found this old issue:
moby/moby#10807
Expected behavior
Docker image is built using either a file called 'Dockerfile' or 'dockerfile' when a command is typed as:
docker build .
Actual behavior
Docker build command returns an error if the dockerfile is called 'dockerfile' e.g.
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount825383798/Dockerfile: no such file or directory
Workaround:
docker build -f dockerfile .
Information
Windows Version: 10.0.19041 Build 19041
Docker Desktop Version: 24.0.0
Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No
Is it reproducible? Yes
Is the problem new? yes
Did the problem appear with an update? Yes 24.0.0
A reproducible case if this is a bug, Dockerfiles with reproduction inside is best.
Any dockerfile using the name 'dockerfile' all lower case
Steps to reproduce the behavior
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount582525092/Dockerfile: no such file or directory
I found this old issue:
moby/moby#10807