nerdctl
nerdctl copied to clipboard
Fail to create container on Windows 11
Description
I'm installed Containerd and nerdctl on my Windows machine, pulled google/cloud-sdk using nerdctl. So, when I try to run google/cloud-sdk container using nerdctl and containerd, the following error is showing up:
Steps to reproduce the issue
- nerdctl.exe pull google/cloud-sdk --all-platforms
- nerdctl.exe run --rm google/cloud-sdk
Describe the results you received and expected
time="2022-05-19T16:34:14+01:00" level=info msg="apply failure, attempting cleanup" error="failed to extract layer sha256:f70b727d55c3bf3e37ab16d9d40bc5f5dd209f01a5514af0146547d3f3eaca60: Failed to safefile.OpenRelative failed in Win32: open \\?\C:\ProgramData\containerd\root\io.containerd.snapshotter.v1.windows\snapshots\14\usr\share\man\man7\pam.7.gz: Cannot create a file when that file already exists. (0x1f) usr\share\man\man7\pam.7.gz: unknown" key="extract-212205400-ByGC sha256:f70b727d55c3bf3e37ab16d9d40bc5f5dd209f01a5514af0146547d3f3eaca60"
time="2022-05-19T16:34:14+01:00" level=fatal msg="failed to extract layer sha256:f70b727d55c3bf3e37ab16d9d40bc5f5dd209f01a5514af0146547d3f3eaca60: Failed to safefile.OpenRelative failed in Win32: open \\?\C:\ProgramData\containerd\root\io.containerd.snapshotter.v1.windows\snapshots\14\usr\share\man\man7\pam.7.gz: Cannot create a file when that file already exists. (0x1f) usr\share\man\man7\pam.7.gz: unknown"
What version of nerdctl are you using?
nerdctl version 0.19.0
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
Rancher Desktop for Windows
Host information
Client: Namespace: default Debug Mode: false
Server: Server Version: v1.6.3 Storage Driver: windows Logging Driver: json-file Cgroup Driver: Cgroup Version: Plugins: Log: json-file Storage: windows-lcow windows Security Options: Kernel Version: Operating System: OSType: windows Architecture: CPUs: 0 Total Memory: 0B Name: a ID: d95656fe-7a9a-48b0-9fa9-bffafb70e566
Rancher Desktop for Windows
The Host information
doesn’t seem so.
If you are trying to run a Linux container, please uninstall Windows-native version of containerd.exe, nerdctl.exe, and make sure to use Rancher Desktop version of nerdctl.exe.
Those errors came from containerd, and look like they would have been part of the pull
call, not the run
call.
I guess that layer contained both pam.7.gz
and PAM.7.gz
or similar (i.e., two files with the same name except case) and the Windows Snapshotter is probably not prepared to handle that. (The Windows snapshotter should not be seeing Linux image layers at all, AFAIK, there's the "lcow" snapshotter for that).
Removing --all-platforms
probably would have helped, since that's a Linux-platform image and the container being run is the Windows-platform container.
If there was anything nerdctl-related here, it's not apparent from the bug report. The only things I see here are containerd-related, unless nerdctl was somehow putting containerd into a bad state, such that it tried to store a Linux image layer using the Windows snapshotter.