Skip to content

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

@allanbarklie

Description

@allanbarklie
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions