envd icon indicating copy to clipboard operation
envd copied to clipboard

feat: containerd/nerdctl provider support

Open junnplus opened this issue 3 years ago • 6 comments
trafficstars

Description

nerdctl is a Docker-compatible CLI for containerd and it has many new features like rootless mode, compose integration, work with buildkit, and so on.

PS. I am one of the main maintainers of containerd/nerdctl.


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

junnplus avatar Jul 08 '22 08:07 junnplus

LGTM, I will follow this issue.

aseaday avatar Jul 08 '22 08:07 aseaday

I look throught the code of nerdctl, and there may be a little problem: image As you can see from the illustrations, envd use the golang's docker client package to talk with the dockerd. There seems to be no such a thing in nerdctl. A way to solve this I think is that you could provide a client sdk which work the same way as cli binary. Then nerdctl users could build image and container by envd and see the containers in the nerdctl cli. @junnplus WDYT

aseaday avatar Jul 08 '22 09:07 aseaday

Why not consider using binary directly?

IMHO, introducing daemon/api brings more complexity. Calling as a subprocess is more flexible.

ref: https://github.com/containerd/nerdctl/issues/798

junnplus avatar Jul 08 '22 09:07 junnplus

LGTM. Does nerdctl provide some functions indicate the binary path? @gaocegege WDYT

aseaday avatar Jul 08 '22 09:07 aseaday

Does nerdctl provide some functions indicate the binary path?

I recommend using exec.LookPath("nerdctl") to find.

junnplus avatar Jul 08 '22 10:07 junnplus

I think this is a good idea, espeically the support of estargz from nerdctl can greatly improve user experiences using large images (most cases in data science scenarios). On the other hand, we may also provide kata-container support later, to deliver a full VM experience(for example user may want to use docker inside container), which is also supported by nerdctl (I guess?).

However we may need some more investigations about nerdctl to decide how to deliver this.

VoVAllen avatar Jul 08 '22 11:07 VoVAllen

I think we should support nerdctl, especially for lima users.

gaocegege avatar Nov 28 '22 14:11 gaocegege

Lima works like a charm on apple M1. And the container runtime CLI is nerdctl by default.

gaocegege avatar Nov 28 '22 14:11 gaocegege