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

Remote Docker: DooD devcontainer mount paths are not converted from Windows to Linux/WSL2 format #1455

Open
FloSch62 opened this issue Dec 6, 2024 · 0 comments

Comments

@FloSch62
Copy link

FloSch62 commented Dec 6, 2024

What happened?
When using a Docker-out-of-Docker (DooD) devcontainer configuration on Windows with WSL2, I'm getting a mount path error. The error occurs because DevPod is using Windows-style paths instead of WSL2-compatible paths.

Error message:

[18:05:56] info docker: Error response from daemon: invalid mount config for type "bind": invalid mount path: 'C:/Users/Flo/.devpod/agent/contexts/default/workspaces/srl-snmp-framework-lab/content' mount path must be absolute.

What did you expect to happen instead?
The path should be automatically converted to WSL2 format (e.g., /mnt/c/Users/Flo/.devpod/agent/contexts/default/workspaces/srl-snmp-framework-lab/) when DevPod interfaces with the Docker daemon running in WSL2.

How can we reproduce the bug? (as minimally and precisely as possible)

My devcontainer.json:

{
    "image": "ghcr.io/srl-labs/containerlab/devcontainer-dood-slim:0.60.0",
    "runArgs": [
        "--network=host",
        "--pid=host",
        "--privileged"
    ],
    "mounts": [
        "type=bind,src=/run/docker/netns,dst=/run/docker/netns",
        "type=bind,src=/var/lib/docker,dst=/var/lib/docker",
        "type=bind,src=/lib/modules,dst=/lib/modules"
    ],
    "workspaceFolder": "${localWorkspaceFolder}",
    "workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind,consistency=cached"
}

Local Environment:

  • DevPod Version: 0.6.4
  • Operating System: windows
  • ARCH of the OS: x86_64

DevPod Provider:

  • Local/remote provider: docker

Anything else we need to know?

  • Docker Desktop is not an option because of license reasons
  • Rancher Desktop was not working as well as they expose docker also via a WSL
  • Docker Host: tcp://localhost:2375
  • Docker Path: C:\Program Files\Docker\cli\docker\docker.exe
  • Docker-in-Docker (DinD) devcontainers work fine
  • Only experiencing issues with Docker-out-of-Docker (DooD) configurations
  • The Docker daemon is running in WSL2, exposed to Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants