-
Notifications
You must be signed in to change notification settings - Fork 745
Description
Description
Trying to start a Windows container using -d and -t at the same time results in an error as follows:
PS C:\> C:\usr\bin\nerdctl\nerdctl.exe run -d -t mcr.microsoft.com/powershell:7.3-windowsservercore-ltsc2022
time="2024-05-03T17:58:37-07:00" level=fatal msg="\"\\\\C:\\\\usr\\\\bin\\\\nerdctl\\\\nerdctl.exe\" must be absolute"
I discovered this because I have a Windows Jenkins agent and I'm using their Docker plugin's ".inside()" method, which calls starts a container using docker run -d -t <whatever>. So far all other functionality has been perfectly Docker compatible, but I can't find a workaround for this. I initially thought the problem was with Jenkins, and the fact that I was running a symlink called "docker.exe" through the Jenkins plugin, however I've been able to consistently replicate the behavior with several different images, calling the nerdctl executable directly, as shown above. I even moved the executable to a directory with no spaces in its name just to eliminate that as a possible issue.
Steps to reproduce the issue
- Pull a compatible Windows image to a Windows machine
- Do
nerdctl run -d -t <that image>
Describe the results you received and expected
I should be able to get a daemonized container with a TTY allocated, but instead I get the above error.
What version of nerdctl are you using?
Client:
Version: v2.0.0-beta.5
OS/Arch: windows/amd64
Git commit: 9236b9370203b7f3274ae8d1417cc6ddcbdd4511
buildctl:
Version: v0.13.2
GitCommit: 2e18d709fefdcc2db20853ee241c75b058189d39
Server:
containerd:
Version: v1.7.13
GitCommit: 7c3aca7a610df76212171d200ca3811ff6096eb8
runc:
Version:
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
Client:
Namespace: default
Debug Mode: false
Server:
Server Version: v1.7.13
Storage Driver: windows
Logging Driver: json-file
Cgroup Driver:
Cgroup Version:
Plugins:
Log: fluentd journald json-file syslog
Storage: windows-lcow windows
Security Options:
Kernel Version:
Operating System:
OSType: windows
Architecture:
CPUs: 0
Total Memory: 0B
Name: <hostname>
ID: <id>