envd
envd copied to clipboard
feat: containerd/nerdctl provider support
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 👍.
LGTM, I will follow this issue.
I look throught the code of nerdctl, and there may be a little problem:
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
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
LGTM. Does nerdctl provide some functions indicate the binary path? @gaocegege WDYT
Does nerdctl provide some functions indicate the binary path?
I recommend using exec.LookPath("nerdctl") to find.
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.
I think we should support nerdctl, especially for lima users.
Lima works like a charm on apple M1. And the container runtime CLI is nerdctl by default.