-
Notifications
You must be signed in to change notification settings - Fork 522
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
Make a CLI-only DockerApiClient
#3263
Comments
I've noticed that |
Work is ongoing for this, it will need to be moved to the 1.21.0 milestone. |
We are continuing to work on a path forward for supporting other Container runtimes. This will be moved to the 1.22 milestone. |
I know a lot of folks are interested so I wanted to give an update. Work on this is proceeding in earnest right now (as in, we're past most of the planning and really writing code!). We have rather ambitious plans so it will take some time. |
Thanks for the update @bwateratmsft! I'm so glad this is underway |
fwiw, podman usage is exploding right now, it's hot -- since the Docker licensing switch, seems a lot of peep's are like "welp, I ought to at least try not using docker" .. and subsequently all the "not-docker" projects have accelerated (because suddenly everybody is aware that docker might lower that $10m to $5m, or even $1m next week) ... so the alternatives are gaining significant maturity and many bugfixes in the past few months. I must report in many respects podman rootless is on par with docker (which definitely wasn't true when this issue was opened). I was quite surprised! Do want to start a branch for this? would you accept contributions/ideas? So in #3531 - you wrote: "The plans are not final, but in rough terms we're envisioning separate extensions being able to register alternative container runtime providers with the Docker extension." my response to your idea: 😄 very clever indeed! .. but yeah, what you are proposing is A LOT more work, feels like this could snowball into a major version change and might have some backward compatibility issues. my concerns/thoughts:
I think docker is one of those 'dev/ops' chores that most pure-dev's don't really understand all that well (and this level of fragmentation & too many choices DEFINITELY doesn't help). I appreciate that you're tackling this holistically. Hope this dialog is helpful. |
Thanks for your thoughts, we appreciate the input! I'll try to address some of your questions here:
The key work on the container runtimes library is still in a private repository but we should be opening it up soon; certainly some time before release. I'll update on this issue once it is opened. We love contributions!
We think that, fundamentally, all of the runtimes deal with the same objects and offer the same operations on those objects. There are exceptions of course (e.g. Podman doesn't have contexts, as far as I'm aware), so we'll need a reasonable user experience in those cases, but I think that's manageable. Consequently, we can create a common interface to abstract away the specific runtime. The architecture we're envisioning is that the Docker extension would permit other extensions to register a container runtime provider conforming to that common interface (and it would also register a Docker provider with itself). Thus, the Docker extension would always be present; marked as a dependency of the other extensions. In addition, the Docker extension would need some kind of experience for choosing which provider should be active; I'm thinking of doing something like what Python has for selecting the interpreter path--that is, an item in the status bar, and when you click it, it allows you to select which provider to use. There also needs to be graceful handling for when these extensions are uninstalled without the setting being updated. Separately from all this work in the Docker extension, we (Microsoft) would probably work on these "sidecar" extension(s) for Podman and Nerdctl.
Yes, mostly. There are some operations that we perform behind-the-scenes in a non-visible shell. There are also others that we very deliberately execute in the VSCode terminal as a task, so that users can see both the command itself and the output (for example, building images). Naturally, we'll need to make both of these work regardless of the runtime in use. As you noted, there are significant advantages to using the HTTP API, instead of the CLI. It's more compatible and much faster. However, we've found a common class of issues (many of them linked in the original comment) that basically boil down to "I have the CLI working, why doesn't the explorer view work?" We are taking a risk using the CLI, but we're hoping that we can avoid the worst of it by continuing to be agile with releases of the extensions. Based on data we've seen, users update VSCode extensions very quickly--usually immediately upon startup, often before the extension activates. Since auto-updating is the default, this isn't terribly surprising. Our hope is that if we encounter a break in the CLI, we can get a fix out to users very quickly. For what it's worth, the Remote - Containers extension went through similar challenges and also ended up going CLI-only. |
This has now been released in Docker extension version 1.23.0. |
with
was above to be corrected in this update? Name: Docker |
We need an implementation of
DockerApiClient
that uses CLI only. This will work better with a wider range of scenarios than the CLI + HTTP daemon through Dockerode + gRPC daemon. Plus it mostly removes the need to look up the Docker context during activation...Potentially resolves:
nerdctl
#3411Related to #2977, #3281
The text was updated successfully, but these errors were encountered: