Add support for Devcontainers in sandbox mode - #342
Conversation
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for aarch64 and x86_64 architectures. |
|
Thank you very much @blue42u! I gave your version a try: |
|
doesn't docker collect user data? If I remember correctly podman doesn't collect user data (podman desktop does though it can be turned off) but I'm pretty sure there are a bunch of closed source bits which collect user data in docker cli. Personally I wouldn't be a fan of adding a bunch of data collection into the flatpak. |
|
@acch Just to check, do you have FWIW this PR doesn't solve the underlying @Pioneer-1-1 AFAICT according to a quick web search: the Docker CLI is open-source (Apache license). Any telemetry is fully opt-in, and you get full customization on the endpoint (https://docs.docker.com/engine/cli/otel/). This PR also builds it from source so there's full source provenance available. Some of Docker's other, proprietary products including Docker Desktop do collect data. You don't need any of them to use Zed's Devcontainer support + this PR. |
|
This version works for me on Aurora 43 (not hugely surprising as it is in the uBlue family). |
I checked again and while I can't find anything explicitly stating it it appears you are right and that docker's telemetry is only in the docker desktop application. In that case no objection from me and thanks for the fix. |
|
Works for me on PopOS 24.04LTS |
|
Confirmed working on Fedora Silverblue 43.20260407.0 without escaping sandbox. |
|
One option would be to add compatibility via an extension; this would allow users who need it to install it without increasing the file size for those who don't, something like: Or better yet, join forces and create a plugin that works with multiple code editors, if possible. |
I can see the rational, but considering how popular devcontainers are now and that their features are baked in to zed it would seem pretty strange to ship a zed flatpak which can't run them |
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for aarch64 and x86_64 architectures. |
I tried the previous build (the first one in this PR which I believe was based on zed v0.230) and that worked fine. However, when I attempted to build a devcontainer with this build it failed. I suspect the reason for this is that between The error I received was: |
|
@Pioneer-1-1 I think you're hitting upstream issue zed-industries/zed#52924. I'm running into a similar issue but elsewhere in the deserialization: Both seem to be issues with the native devcontainers implementation itself, not the Flatpak sandbox... |
It's possible it's an upstream error but I don't think it's the one you mentioned. I'm attempting to create a new dev container not launch an existing one. The Have you tried to run a devcontainer with this latest version on your own system? |
|
I had a bit more of a check through the issue you linked (zed-industries/zed#52924) and I'm not almost certain this is unrelated. The errorlog for that issue includes the line: Whereas my issue appears to be due to: So SSH is succeeding in watching in that issue whereas it fails in mine |
|
All, I've copied these changes over to a PR for |
I replied to your comment over on the preview but TLDR I ran your PR for the preview version and encountered exactly the same issue. |
f453de2 to
5615b63
Compare
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for aarch64 and x86_64 architectures. |
|
@blue42u you're latest fix works a treat, I can now both create new dev containers and run existing ones thanks. |
|
Thanks for working on this, I too use devcontainers heavily. However, I usually use the secrets service integration for registry credentials, and it needs a helper binary (from https://github.com/docker/docker-credential-helpers) that is of course not found in the sandboxed environment. |
Add the Docker/Podman CLIs and socket permissions to the Flatpak bundle. This allows Dev Containers to be opened from inside the sandbox, they will run in a container on the host system. Reference: flathub/dev.zed.Zed#342 Signed-off-by: Jonathon Anderson <anderson.jonathonm@gmail.com>
a852f2a to
3293643
Compare
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for aarch64 and x86_64 architectures. |
Add the Docker/Podman CLIs and socket permissions to the Flatpak bundle. This allows Dev Containers to be opened from inside the sandbox, they will run in a container on the host system. Reference: flathub/dev.zed.Zed#342 Signed-off-by: Jonathon Anderson <anderson.jonathonm@gmail.com>
3293643 to
f706872
Compare
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for aarch64 and x86_64 architectures. |
|
I'm afraid I don't know of a way to update this branch but please update the flatpak manifest to pull the latest versions of the This updates the CLI's and brings this up to date with the current version of zed. P.S. does anyone know if it's possible to submit a PR for a PR? |
|
@Pioneer-1-1 Thanks! I've updated them to Podman All: IMHO we need to get Zed upstream more interested in the Flatpak side of things if we're going to make progress on bugs/missing features like this. I posted a discussion proposing a Flatpak remote (zed-industries/zed#56435) and a proof of concept (zed-industries/zed#60700) before getting swamped at my day job. If you have time, please feel free to jump in and show support or propose other ideas. |
f706872 to
f531194
Compare
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for aarch64 and x86_64 architectures. |
f531194 to
6a7870a
Compare
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
6a7870a to
c4d3871
Compare
|
🚧 Test build enqueued. |
|
❌ Test build was cancelled. Help
|
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for aarch64 and x86_64 architectures. |
Signed-off-by: Jonathon Anderson <anderson.jonathonm@gmail.com>
c4d3871 to
7ffd50e
Compare
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for aarch64 and x86_64 architectures. |
Fixes #336. This is #340 but also installs the
dockerandpodmanCLIs, which avoids the "docker CLI not found" errors that otherwise appear when Zed attempts to start a Devcontainer.This works for me on Bluefin DX, based on Fedora 43. @Pioneer-1-1 @tomaswarynyca @acch can you give this a try?