Skip to content

[Bug]: copy . . (in lower case) does not copy anything #1094

Closed
apple/container-builder-shim
#61

Description

@0f-0b

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

Create a Dockerfile with the following content (note that copy is in lower case), and then run container build.

from debian:stable-slim
workdir /build
copy . .
run cat Dockerfile

Current behavior

The build fails with cat: Dockerfile: No such file or directory.

Expected behavior

The build succeeds.

Environment

- OS: macOS 26.2 (25C56)
- Xcode: Not installed
- Container: container CLI version 0.8.0 (installed from Homebrew)

Relevant log output

[+] Building 1.1s (7/7) FINISHED                                                                                                                       
 => [resolver] fetching image...docker.io/library/debian:stable-slim                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                   0.0s
 => oci-layout://docker.io/library/debian:stable-slim@sha256:ed542b2d269ff08139fc5ab8c762efe8c8986b564a423d5241a5ce9fb09b6c08                     0.8s
 => => resolve docker.io/library/debian:stable-slim@sha256:ed542b2d269ff08139fc5ab8c762efe8c8986b564a423d5241a5ce9fb09b6c08                       0.0s
 => => sha256:4107269d32a679840c1eb0cd8d8925b7a6c7cba09640d07b8c96ab4fe7cbbca9 30.13MB / 30.13MB                                                  0.3s
 => => extracting sha256:4107269d32a679840c1eb0cd8d8925b7a6c7cba09640d07b8c96ab4fe7cbbca9                                                         0.5s
 => [internal] load build context                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                   0.0s
 => [linux/arm64/v8 1/4] WORKDIR /build                                                                                                           0.2s
 => [linux/arm64/v8 2/4] COPY . .                                                                                                                 0.0s
 => ERROR [linux/arm64 3/4] RUN cat Dockerfile                                                                                                    0.1s
------
 > [linux/arm64 3/4] RUN cat Dockerfile:
0.056 cat: Dockerfile: No such file or directory
------
Error: unknown (2): failed to solve: process "/bin/sh -c cat Dockerfile" did not complete successfully: exit code: 1

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added theissue type on Jan 25, 2026
  2. jglogan commented on Jan 27, 2026

    @jglogan
    Contributor

    @0f-0b Reproduced this, thank you for the report!

    Dockerfile:

    from debian:stable-slim
    workdir /build
    copy . .
    run ls -l

    Dockerfile.uppercase:

    FROM debian:stable-slim
    WORKDIR /build
    COPY . .
    RUN ls -l
    % container build -t test -f Dockerfile --progress plain .
    Warning! Running debug build. Performance may be degraded.
    #1 [resolver] fetching image...docker.io/library/debian:stable-slim
    #1 DONE 0.0s
    
    ...
    
    #6 [linux/arm64/v8 2/4] COPY . .
    #6 DONE 0.0s
    
    #7 [linux/arm64 3/4] RUN ls -l
    #7 0.059 total 0
    #7 DONE 0.1s
    
    ...
    
    Successfully built test:latest
    
    % container run test ls -l
    Warning! Running debug build. Performance may be degraded.
    total 0
    % container build -t test -f Dockerfile.uppercase --progress plain .
    Warning! Running debug build. Performance may be degraded.
    #1 [resolver] fetching image...docker.io/library/debian:stable-slim
    #1 DONE 0.0s
    
    ...
    
    #6 [linux/arm64/v8 2/4] COPY . .
    #6 DONE 0.0s
    
    #7 [linux/arm64 3/4] RUN ls -l
    #7 0.035 total 12
    #7 0.035 -rw-r--r-- 1 root root 58 Jan 27 20:47 Dockerfile
    #7 0.035 -rw-r--r-- 1 root root 58 Jan 27 20:47 Dockerfile.uppercase
    #7 0.035 -rw-r--r-- 1 root root 12 Jan 27 20:47 hello.txt
    #7 DONE 0.0s
    
    ...
    
    Successfully built test:latest
    
    % container run test ls -l                                          
    Warning! Running debug build. Performance may be degraded.
    total 12
    -rw-r--r-- 1 root root 58 Jan 27 20:47 Dockerfile
    -rw-r--r-- 1 root root 58 Jan 27 20:47 Dockerfile.uppercase
    -rw-r--r-- 1 root root 12 Jan 27 20:47 hello.txt
    
  3. added
    facet/builder
    on Jan 27, 2026
  4. JaewonHur commented on Jan 29, 2026

    @JaewonHur
    Contributor

    Hi @0f-0b

    I just made a PR for fixing this issue. Could you give a try?

    • Build a custom buildkit image
    git clone -b make-copy-case-insensitive https://github.com/JaewonHur/container-builder-shim
    cd container-builder-shim
    container build -t builder -f ./Dockerfile
    
    • Set built image to default image.builder
    container system property set image.builder builder:latest
    container kill buildkit
    container rm buildkit
    
    • Try build your image (with lowercased copy)
    container build -f ./Dockerfile ...
    
  5. 0f-0b commented on Jan 29, 2026

    @0f-0b
    Author

    I just made a PR for fixing this issue. Could you give a try?

    Yes. Can confirm it works.

  6. JaewonHur commented on Jan 29, 2026

    @JaewonHur
    Contributor

    Thanks!

  7. added a commit that references this issue on Feb 5, 2026
  8. added a commit that references this issue on Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    facet/builder

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions