FATA[0000] lstat /Containerfile: no such file or directory

Open
#4,285 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, go

Research direction

Start by reproducing nerdctl build -t db:20250523 . in Rancher Desktop WSL from the reported /mnt/c/.../couchdb path, then compare it with Git Bash. Trace how the build command selects Dockerfile or Containerfile and verify that completion uses the local Dockerfile without requiring a root-level path.

Written by the indexing model from the issue text.

Description

kind/external/rancher-desktop
Description

Using nerdctl (from Rancher Desktop v 1.18.2) to build a container doesn't find the local Dockerfile and seems to want a Containerfile at the root of the filesystem, not the current path.

Build succeeds using Git Bash on the same machine using the same command, so for now I context switch from rancher-desktop WSL to git bash to build and then back to rancher-desktop WSL to run.

Steps to reproduce the issue
  1. ls -al Dockerfile
    -rw-rw-rw- 1 root 0 151 May 23 06:33 Dockerfile
  2. nerdctl build -t db:20250523 .
    FATA[0000] lstat /Containerfile: no such file or directory
  3. pwd
    /mnt/c/Users/myuser/Documents/projects/couchdb
Describe the results you received and expected
[+] Building 2.1s (7/7)
[+] Building 2.2s (7/7) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                     0.1s
 => => transferring dockerfile: 190B                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/couchdb:3.4.2                                                                                                                         0.3s
 => [internal] load .dockerignore                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                          0.0s
 => [internal] load build context                                                                                                                                                        0.0s
 => => transferring context: 31B                                                                                                                                                         0.0s
 => [1/2] FROM docker.io/library/couchdb:3.4.2@sha256:2817ad50b5c5cf7461f5963670466197426605a790a19a6208068c509a2d8a59                                                                   0.1s
 => => resolve docker.io/library/couchdb:3.4.2@sha256:2817ad50b5c5cf7461f5963670466197426605a790a19a6208068c509a2d8a59                                                                   0.0s
 => CACHED [2/2] COPY local.ini /opt/couchdb/etc/local.d                                                                                                                                 0.0s
 => exporting to docker image format                                                                                                                                                     1.5s
 => => exporting layers                                                                                                                                                                  0.0s
 => => exporting manifest sha256:0cb940aa5b3847f2f1c9419f030e97e85f3d1fe390f6dcf2ca6214e12576e35d                                                                                        0.0s
 => => exporting config sha256:fe79dc82c1b3e7612789f6f807bf5a8bd697c61e1055cbecc119eda1b07b7a8d                                                                                          0.0s
 => => sending tarball                                                                                                                                                                   1.4s
Loaded image: docker.io/library/db:20250522
What version of nerdctl are you using?

nerdctl version 2.0.3

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

Rancher Desktop for Windows

Host information

Edition Windows 11 Pro
Version 24H2
Installed on ‎2025-‎02-‎22
OS build 26100.4061
Experience Windows Feature Experience Pack 1000.26100.84.0

Dominant language
Go
Stars
10.5k
Forks
853
Avg merge
6d 14h
Merged PRs (30d)
38

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from containerd/nerdctl

All issues in containerd/nerdctl

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.