Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrade to 24.0.0 (and factory reset) docker build is now case sensitive - needs 'Dockerfile' errors with 'dockerfile' #406

Closed
2 tasks done
allanbarklie opened this issue Oct 1, 2020 · 7 comments

Comments

@allanbarklie
Copy link

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: 80BF7F34-05E5-4A73-8CBA-640A107F6666/20201001120231

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

  1. name a dockerfile 'dockerfile' all lower case
  2. try and build with: docker build .
  3. 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
  4. try instead with: docker build -f dockerfile .
  5. watch it succeed

I found this old issue:
moby/moby#10807

@allanbarklie
Copy link
Author

I'm not sure what the intended behaviour is but this is a an undocumented change in behaviour.
In our own use case we will just rename our dockerfiles to 'Dockerfile'.
I thought it would be useful to have this change captured in a defect - even if it ends up being just to document it for others getting the error.

@stephen-turner
Copy link

Thanks for the report, @allanbarklie, but I wonder if I could ask you to file it in moby/moby? The command line tools are just an upstream for us, which we bundle. Sorry, I would just move the ticket but I can't because the target is not in the docker org.

@allanbarklie
Copy link
Author

@stephen-turner Thanks for taking the time to look at this . I'd like to confirm, your releases notes say Docker Desktop now enables BuildKit by default after a reset to factory defaults. To revert to the old docker build experience, go to Preferences > Docker Engine and then disable the BuildKit feature.
As this directly references a change to the tech. used to provide docker build functionality, I'd like to check if this change affects what dependency the change should be reported to?

@stephen-turner
Copy link

@allanbarklie Actually, that's a good point. You can check whether that's the cause by changing back to the old build in the way described. If it is in buildx but not legacy build, I can move this ticket to docker/buildx.

@allanbarklie
Copy link
Author

allanbarklie commented Oct 1, 2020

@stephen-turner thanks - I can confirm that the problem occurs with
"features": {
"buildkit": true
}

and does not occur with

"features": {
"buildkit": false
}

@stephen-turner
Copy link

Great, thanks, so I guess buildkit has regressed the earlier fix you mentioned in moby/moby#10807.
I'll reopen the ticket and move it into the buildkit repo.

@stephen-turner stephen-turner reopened this Oct 1, 2020
@stephen-turner stephen-turner transferred this issue from docker/for-win Oct 1, 2020
@crazy-max
Copy link
Member

Fixed by #444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants