Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running a Windows container with --detach and --tty results in "nerdctl.exe must be absolute" error message #2966

Open
structurefall opened this issue May 4, 2024 · 1 comment
Labels
kind/unconfirmed-bug-claim Unconfirmed bug claim platform/Windows/Non-WSL2 Microsoft Windows (non-WSL2)

Comments

@structurefall
Copy link

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

  1. Pull a compatible Windows image to a Windows machine
  2. 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>
@structurefall structurefall added the kind/unconfirmed-bug-claim Unconfirmed bug claim label May 4, 2024
@AkihiroSuda AkihiroSuda added the platform/Windows/Non-WSL2 Microsoft Windows (non-WSL2) label May 4, 2024
@TinaMor
Copy link
Contributor

TinaMor commented May 30, 2024

Thanks @structurefall for raising the issue. Will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/unconfirmed-bug-claim Unconfirmed bug claim platform/Windows/Non-WSL2 Microsoft Windows (non-WSL2)
Projects
None yet
Development

No branches or pull requests

3 participants