{"slug": "getting-the-devcontainer-dx-back-with-docker-sbx-without-ssh-using-zed-editor", "title": "Getting the devcontainer DX back with Docker SBX, without SSH, using Zed Editor", "summary": "A developer published a Grain toolchain kit for Docker's sbx sandboxes and a Zed Editor extension that together restore devcontainer-style development without SSH, using the language server provided inside the sandbox. The setup targets Grain v0.7.3 Farro, a functional language that compiles to WebAssembly and is not installed on the host machine; a sbxenv.yaml file referencing docker.io/k33g/grain-toolchain-kit:0.7.3 with agent: shell is started via 'sbx env run --force' and torn down with 'sbx env rm --force'. Because no official Grain extension exists for Zed, the author's zed-grain dev extension must be built from source, which requires Rust.", "body_md": "# Getting the devcontainer DX back with Docker SBX, without SSH, using Zed Editor\n\nWhat I like about [devcontainer](https://containers.dev/) is being able to have my whole development environment in my editor, with the IDE recognizing the language and the runtime I'm using, without installing anything on the host machine, since everything \"runs\" in containers. The IDE (VS Code) \"talks\" to the container and your development environment through a dedicated extension. I already wrote about this: [Reproducing the devcontainer DX, but securely with SBX](https://k33g.org/p/20261017-devsbx), where I used the VS Code Remote-SSH extension (or its Zed Editor equivalent) together with the [SSH access](https://docs.docker.com/ai/sandboxes/integrations/) feature of `sbx`.\n\nBut actually, you can do it without SSH 😮 🤔. Indeed, if your editor has the extension for your language, and your runtime (what will run inside `sbx`) also provides the LSP server (Language Server Protocol), you have everything you need.\n\nI wanted to validate this using Zed Editor and a language that is not installed on my machine: **[Grain](https://grain-lang.org)**, on the occasion of the recent release of [v0.7.3 Farro](https://grain-lang.org/blog/2026/11/16/new-release-grain-v0.7.3-farro/). To make it short, **[Grain](https://grain-lang.org)** is a functional language whose compilation target is WebAssembly.\n\n## [The Grain Kit for SBX](#the-grain-kit-for-sbx)\n\nSo I started by creating and publishing a Grain kit for `sbx`; you'll find the source code here: [sbx-kits/grain-toolchain](https://rickub.com/sbx-kits/grain-toolchain) (always check the content of what you want to use).\n\nNow, using it couldn't be simpler: create a `sbxenv.yaml` file in your working directory, with the following content:\n\n```\nschemaVersion: \"1\"\n\nname: grain-dev-env\n\nagent: shell\n\nworkspace: .\n\nkits:\n  - docker.io/k33g/grain-toolchain-kit:0.7.3\n```\n\n✋ I used `agent: shell` because I don't need an AI agent for this project.\n\nAnd now you just have to run:\n\n```\nsbx env run --force\n```\n\nAnd now you have a fully functional Grain environment:\n\nNow destroy the `sbx` sandbox with the following command:\n\n```\nsbx env rm --force\n```\n\nAll that's left is to set up our project with Zed Editor.\n\n## [Grain and Zed Editor](#grain-and-zed-editor)\n\nSo, unfortunately, there is no Grain extension for Zed (no official one, at least). Never mind, I prepared one for you here: [zed-extensions/zed-grain](https://rickub.com/zed-extensions/zed-grain), 🦀 however, you'll need Rust to install it.\n\n### [Grain Extension for Zed](#grain-extension-for-zed)\n\nInstallation is simple:\n\n1. Clone the extension repository.\n2. Open the extensions page with `cmd-shift-x` (macOS) or`ctrl-shift-x` (Linux/Windows), or through the \"Zed > Extensions\" menu.[zed](https://zed.dev/docs/extensions/installing-extensions)\n3. Click the **Install Dev Extension** button.**Even simpler** , you can also run the`zed: install dev extension` action from the command palette.[zed](https://zed.dev/docs/extensions/developing-extensions)\n4. In the dialog, select the root folder of the extension, the one containing `extension.toml` .[zed](https://zed.dev/docs/extensions/developing-extensions)\n5. Zed builds the extension from this folder. It shows up in the extensions list.\n\nNow let's set up our project.\n\n### [Zed Project Settings](#zed-project-settings)\n\nWe are in the working directory (the same one where the `sbxenv.yaml` file is), so create a `.zed` subfolder that will contain two files:\n\n- `tasks.json`\n- `settings.json`\n\n#### [The tasks](#the-tasks)\n\nHere is the content of `.zed/tasks.json`:\n\n```\n[\n  {\n    \"label\": \"Create shell sandbox (sbx)\",\n    \"command\": \"sbx\",\n    \"args\": [\"env\", \"create\", \"--force\"],\n    \"use_new_terminal\": true,\n    \"allow_concurrent_runs\": true,\n    \"reveal\": \"always\",\n    \"hide\": \"on_success\"\n\n  },\n  {\n    \"label\": \"Remove shell sandbox (sbx)\",\n    \"command\": \"sbx\",\n    \"args\": [\"env\", \"rm\", \"--force\"],\n    \"use_new_terminal\": true,\n    \"allow_concurrent_runs\": true,\n    \"reveal\": \"always\",\n    \"hide\": \"on_success\"\n  },\n  {\n    \"label\": \"Shell local\",\n    \"command\": \"zsh\",\n    \"use_new_terminal\": true,\n    \"allow_concurrent_runs\": true\n  }\n]\n```\n\nThis file provides Zed commands to:\n\n- Create an `sbx` sandbox with the Grain runtime:**\"Create shell sandbox (sbx)\"**\n- Remove it: **\"Remove shell sandbox (sbx)\"**\n- And also open a local shell (the host one, not the sandbox): **Shell local**\n\nTo call these commands, just open the command palette with `cmd-shift-p` (macOS) or `ctrl-shift-p` (Linux/Windows), select **`task: spawn`** in the list of commands, and then select the task to run.\n\n#### [Zed settings for the project](#zed-settings-for-the-project)\n\nHere is the content of `.zed/settings.json`:\n\n```\n// Project settings for Zed.\n// The Grain LSP runs inside the sbx sandbox \"grain-dev-env\" \n// (which has the grain-toolchain kit).\n{\n  \"lsp\": {\n    \"grain-lsp\": {\n      \"binary\": {\n        \"path\": \"sbx\",\n        \"arguments\": [\n          \"exec\", \"-i\",\n          \"-w\", \"/Users/k33g/kDrive/Rickub/webassembly/grain-1st-steps/demo\",\n          \"grain-dev-env\",\n          \"grain\", \"lsp\"\n        ]\n      }\n    }\n  },\n  // Zed's integrated terminal opens a shell inside the sandbox.\n  \"terminal\": {\n    \"shell\": {\n      \"with_arguments\": {\n        \"program\": \"sbx\",\n        \"args\": [\n          \"exec\", \"-it\",\n          \"-w\", \"/Users/k33g/kDrive/Rickub/webassembly/grain-1st-steps/demo\",\n          \"grain-dev-env\",\n          \"bash\", \"-l\"\n        ]\n      }\n    }\n  }\n}\n```\n\nSo we defined:\n\n- A **`\"grain-lsp\"`** entry in`\"lsp\"` to specify how to call the Grain LSP server with the`grain lsp` command, using`sbx exec` to run it inside the sandbox (it's important to set the absolute path of your working folder:`/Users/k33g/kDrive/Rickub/webassembly/grain-1st-steps/demo` , of course adapt it to your case).\n- And a **`\"terminal\"`** entry to specify that the default terminal we open in Zed Editor will be the`sbx` shell.\n\nAnd now we can start coding in Grain!\n\n## [Get started with Grain in Zed Editor](#get-started-with-grain-in-zed-editor)\n\nLaunch Zed in your working folder with the `zed .` command:\n\n```\n➜  demo git:(main) ✗ pwd\n/Users/k33g/kDrive/Rickub/webassembly/grain-1st-steps/demo\n\n➜  demo git:(main) ✗ zed .\n```\n\nOnce Zed is launched, you can run the task to create the sandbox:\n\nAnd then, every time you open a terminal, you are in the `sbx` shell:\n\nAnd now, when you start coding in Grain, you can see the LSP server at work:\n\nIf the LSP server isn't working, just restart it:\n\nAnd of course, you can build and run your Grain code:\n\nAnd if you install **[WasmEdge](https://wasmedge.org/)** in the sandbox:\n\n```\ncurl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash\nsource $HOME/.wasmedge/env\nwasmedge --version\n```\n\nYou'll also be able to use it to run the `hello.wasm` module:\n\nThere you go! That's all for today. You've seen that it's pretty easy to set up, and since it's easy to mix kits, you can easily add other tools and toolchains. And of course, you can adapt what I did for any other language. Happy coding! 🤓\n\nFind the demo code here: [demo](https://rickub.com/webassembly/grain-1st-steps/tree/main/demo)\n\nWritten by\n\nKeep reading\n\n### Reproducing the devcontainer DX, but securely with SBX\n\nConnect VS Code over SSH to an sbx sandbox built from kits, for a devcontainer-like workflow with microVM isolation, secrets protection and network policies.\n\nOct 17, 2026\n\n### Zed Editor + Docker Agent + ACP, but in a sandbox: running the agent with sbx\n\nRun Docker Agent inside a Docker sandbox (sbx) and connect Zed to it over ACP, keeping llmman local while isolating the agent from your machine.\n\nOct 4, 2026\n\n### Improving the Developer Experience with SBX Kits\n\nImprove the developer experience with sbx kits: reusable sandbox customizations for Go, Node.js, and code-server extensions.\n\nMay 1, 2026\nFrom other blogs", "url": "https://wpnews.pro/news/getting-the-devcontainer-dx-back-with-docker-sbx-without-ssh-using-zed-editor", "canonical_source": "https://k33g.org/p/20261129-sbx-grain-devxp", "published_at": "2026-11-29 00:00:00+00:00", "updated_at": "2026-11-29 12:15:04.354078+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Docker", "sbx", "Zed Editor", "Grain", "Grain v0.7.3 Farro", "Language Server Protocol", "WebAssembly", "Rust"], "also_reported_by": [], "takeaway": "Pairing an editor extension with the LSP server running inside a Docker sbx sandbox gives full devcontainer-style language support without SSH, demonstrated with a Grain v0.7.3 kit launched by 'sbx env run --force'.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/getting-the-devcontainer-dx-back-with-docker-sbx-without-ssh-using-zed-editor", "markdown": "https://wpnews.pro/news/getting-the-devcontainer-dx-back-with-docker-sbx-without-ssh-using-zed-editor.md", "text": "https://wpnews.pro/news/getting-the-devcontainer-dx-back-with-docker-sbx-without-ssh-using-zed-editor.txt", "jsonld": "https://wpnews.pro/news/getting-the-devcontainer-dx-back-with-docker-sbx-without-ssh-using-zed-editor.jsonld"}}