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

Rancher Desktop for VSCode devcontainers? #800

Closed
jonathaneckman opened this issue Oct 15, 2021 · 6 comments
Closed

Rancher Desktop for VSCode devcontainers? #800

jonathaneckman opened this issue Oct 15, 2021 · 6 comments
Assignees

Comments

@jonathaneckman
Copy link

This is more of a question than a feature request. My team has been transitioning to VS Code devcontainers for some time. We use Docker Desktop solely because it is a requirement for devcontainers to function. We are searching for a Docker Desktop alternative that handles the glue needed to setup WSL2 with docker on Windows and the same on Mac. Could Rancher Desktop be used as a drop in replacement for Docker Desktop today or after #673 is released?

If so and if getting started with Rancher Desktop is as easy as what Docker Desktop provides today, perhaps it could become more deeply integrated or recommended by the VS Code team, such as with this issue.

microsoft/vscode-remote-release#5538

@jandubois
Copy link
Member

Thank you for raising this issue. I think it will indeed become easier to do this once Rancher Desktop supports the docker-cli. Otherwise you would need to extend the devcontainer support to work with nerdctl.

We'll need to investigate this as a potential use-case, so I'll mark it as an enhancement request for now.

@autrk
Copy link

autrk commented Dec 23, 2021

I am using version 0.7.1 with dockerd enabled. When I start VS code from WSL (my code is in the filesystem of an Ubuntu 20.04 distribution) and then try to start my devcontainer, this fails with the following error message:

docker: Error response from daemon: invalid mount config for type "bind": invalid mount path: '1ddff10d-b7f5-4248-87dc-c16fa415c643' mount path must be absolute.

The command that fails is the following:

docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=/home/ckihm/workspace/sbss-example-service,target=/workspaces/sbss-example-service --mount type=volume,src=vscode,dst=/vscode --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker-host.sock -l vsch.local.folder=\\wsl$\Ubuntu-DevEnv\home\ckihm\workspace\sbss-example-service -l vsch.quality=stable -l vsch.remote.devPort=0 --init --entrypoint /bin/sh vsc-sbss-example-service-877b6f700ecd25f2f1f2e8038c325ff9-features-uid -c echo Container started

However, the paths are correct. If I try in the shell to resolve the used paths then this works without problems.

I am quite sure that this is the only problem that currently prevents the use of VS Code devcontainer with rancher desktop. I have also tried to prefix the paths with \wsl$\Ubuntu-DevEnv\ and prober quotet the backslashes, but without luck.

If you have any hint which might solve this issue, I would appreciate it.

@oleksis
Copy link

oleksis commented Dec 27, 2021

With Rancher Desktop 0.7.1, dockerd and Visual Studio Code 1.63.2 work

474E0750-3FCE-4FF8-B90F-FD808141F683

@n0rig
Copy link

n0rig commented Jan 5, 2022

@jonathaneckman / @jandubois can we close this out since it's working.

@jonathaneckman
Copy link
Author

Yes. My team has been using it since the day you released 0.7 and its working great. Thanks for your hard work!

@LaurentLesle
Copy link

Had to change the docker context to rancher-desktop to get it working. Mine was on docker desktop but enabling the moby protocol did not switched to the default or rancher-desktop.

docker context ls                 
NAME                DESCRIPTION                               DOCKER ENDPOINT                                      ERROR
default             Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                          
desktop-linux                                                 unix:///Users/xxx/.docker/run/docker.sock   
rancher-desktop *   Rancher Desktop moby context              unix:///Users/xxx/.rd/docker.sock   

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

7 participants