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 / nerdctl/containerd #340

Closed
codeagencybe opened this issue May 24, 2023 · 12 comments · Fixed by #341 or #1011
Closed

rancher desktop / nerdctl/containerd #340

codeagencybe opened this issue May 24, 2023 · 12 comments · Fixed by #341 or #1011
Assignees

Comments

@codeagencybe
Copy link

codeagencybe commented May 24, 2023

Is your feature request related to a problem?
Use with Rancher Desktop and containerd+nerdctl

Which solution do you suggest?
How to use DevPod with nerdctl instead of Docker?

Which alternative solutions exist?
/

Additional context
I'm not using Docker but alternative Rancher Desktop on MacOS which comes with containerd and nerdctl default.
I already replaced all "Docker" commands to Nerdctl (eg Docker run .... -> Nerdctl run ... or Docker compose -> Nerdctl compose ...) via my zshrc shell as custom aliases but this also doesn't work for DevPod.

Any documentation how I can do this?

@ThomasK33
Copy link

Hey @codeagencybe 👋, thanks for opening this issue.

Currently, the shell commands invoked by devpod run in non-interactive shells; thus, any aliases configured will not be set.
Also, as devpod invokes either a bash or sh, depending on availability, you'd have to configure aliases in the respective .bashrc or .profile files.

I've opened a PR to start shells as interactive so that those aliases will be used in the future.
For now, you could symlink docker to nerdctl in a directory somewhere in your $PATH.

@ThomasK33
Copy link

Quick heads up, since this issue was automatically closed with the PR: DevPod will start interactive shells starting with the next release so that one's aliases will be set and used.
Drop-in replacements and aliases should be possible.

In the future, we'll also look into detecting the user's default shell and execute commands using that in interactive mode, but... that's another issue ^^.

@ThomasK33
Copy link

Hey @codeagencybe, could you please try the 0.16.0 release and set your docker aliases in a .bashrc file?

@ThomasK33
Copy link

And we had to revert this PR due to issues with interactive shells and suspensions.

We will have to find another way to source aliases.

@ThomasK33 ThomasK33 reopened this May 25, 2023
@codingbutstillalive
Copy link

Does it work with Rancher Desktop at all? I think by default it is using the normal docker deamon, doesn't it?

@codeagencybe
Copy link
Author

I gave up on Rancher Desktop with DevPod, just impossible to get it working.
I reverted to Docker Desktop for the time being but now having other errors happening as mentioned in #355

@codingbutstillalive
Copy link

codingbutstillalive commented May 30, 2023 via email

@joebowbeer
Copy link

Fixed?

@chawyehsu
Copy link

Purely using nerdctl as docker command just does not work. --sig-proxy is not yet implemented in nerdctl.

Might related containerd/nerdctl#392

[20:52:02] debug Workspace Folder already exists
[20:52:02] debug Using docker command 'nerdctl'
[20:52:06] debug Running docker command: nerdctl run --sig-proxy=false --mount type=bind,source=<redacted...>
trap "exit 0" 15

exec "$@"
while sleep 1 & wait $!; do :; done -
[20:52:06] info 2023/07/12 20:52:06 Error parsing arguments: command "container run" does not support option --sig-proxy=false
[20:52:06] info time="2023-07-12T12:52:06Z" level=fatal msg="unknown flag: --sig-proxy"
...

@FabianKramm
Copy link
Member

@chawyehsu yeah since we mostly reused existing devcontainers code for devpod, this causes issues, we could remove this within devpod, but not sure if that would have other sideeffects and fix the problem completely.

@joebowbeer
Copy link

joebowbeer commented Dec 30, 2023

@codingbutstillalive asks:

Does it work with Rancher Desktop at all? I think by default it is using the normal docker deamon, doesn't it?

I expect Rancher Desktop w/dockerd to work because Rancher Desktop works with vscode devcontainers:

rancher-sandbox/rancher-desktop#800

@pascalbreuninger
Copy link
Member

DevPod should be compatible with nerdctl and containerd after we merge #1011. We consider this as an experimental feature, use at your own risk 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants