# Getting the devcontainer DX back with Docker SBX, without SSH, using Zed Editor

> Source: <https://k33g.org/p/20261129-sbx-grain-devxp>
> Published: 2026-11-29 00:00:00+00:00

**Key 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'.

# Getting the devcontainer DX back with Docker SBX, without SSH, using Zed Editor

What 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`.

But 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.

I 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.

## [The Grain Kit for SBX](#the-grain-kit-for-sbx)

So 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).

Now, using it couldn't be simpler: create a `sbxenv.yaml` file in your working directory, with the following content:

```
schemaVersion: "1"

name: grain-dev-env

agent: shell

workspace: .

kits:
  - docker.io/k33g/grain-toolchain-kit:0.7.3
```

✋ I used `agent: shell` because I don't need an AI agent for this project.

And now you just have to run:

```
sbx env run --force
```

And now you have a fully functional Grain environment:

Now destroy the `sbx` sandbox with the following command:

```
sbx env rm --force
```

All that's left is to set up our project with Zed Editor.

## [Grain and Zed Editor](#grain-and-zed-editor)

So, 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.

### [Grain Extension for Zed](#grain-extension-for-zed)

Installation is simple:

1. Clone the extension repository.
2. 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)
3. 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)
4. In the dialog, select the root folder of the extension, the one containing `extension.toml` .[zed](https://zed.dev/docs/extensions/developing-extensions)
5. Zed builds the extension from this folder. It shows up in the extensions list.

Now let's set up our project.

### [Zed Project Settings](#zed-project-settings)

We are in the working directory (the same one where the `sbxenv.yaml` file is), so create a `.zed` subfolder that will contain two files:

- `tasks.json`
- `settings.json`

#### [The tasks](#the-tasks)

Here is the content of `.zed/tasks.json`:

```
[
  {
    "label": "Create shell sandbox (sbx)",
    "command": "sbx",
    "args": ["env", "create", "--force"],
    "use_new_terminal": true,
    "allow_concurrent_runs": true,
    "reveal": "always",
    "hide": "on_success"

  },
  {
    "label": "Remove shell sandbox (sbx)",
    "command": "sbx",
    "args": ["env", "rm", "--force"],
    "use_new_terminal": true,
    "allow_concurrent_runs": true,
    "reveal": "always",
    "hide": "on_success"
  },
  {
    "label": "Shell local",
    "command": "zsh",
    "use_new_terminal": true,
    "allow_concurrent_runs": true
  }
]
```

This file provides Zed commands to:

- Create an `sbx` sandbox with the Grain runtime:**"Create shell sandbox (sbx)"**
- Remove it: **"Remove shell sandbox (sbx)"**
- And also open a local shell (the host one, not the sandbox): **Shell local**

To 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.

#### [Zed settings for the project](#zed-settings-for-the-project)

Here is the content of `.zed/settings.json`:

```
// Project settings for Zed.
// The Grain LSP runs inside the sbx sandbox "grain-dev-env" 
// (which has the grain-toolchain kit).
{
  "lsp": {
    "grain-lsp": {
      "binary": {
        "path": "sbx",
        "arguments": [
          "exec", "-i",
          "-w", "/Users/k33g/kDrive/Rickub/webassembly/grain-1st-steps/demo",
          "grain-dev-env",
          "grain", "lsp"
        ]
      }
    }
  },
  // Zed's integrated terminal opens a shell inside the sandbox.
  "terminal": {
    "shell": {
      "with_arguments": {
        "program": "sbx",
        "args": [
          "exec", "-it",
          "-w", "/Users/k33g/kDrive/Rickub/webassembly/grain-1st-steps/demo",
          "grain-dev-env",
          "bash", "-l"
        ]
      }
    }
  }
}
```

So we defined:

- 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).
- And a **`"terminal"`** entry to specify that the default terminal we open in Zed Editor will be the`sbx` shell.

And now we can start coding in Grain!

## [Get started with Grain in Zed Editor](#get-started-with-grain-in-zed-editor)

Launch Zed in your working folder with the `zed .` command:

```
➜  demo git:(main) ✗ pwd
/Users/k33g/kDrive/Rickub/webassembly/grain-1st-steps/demo

➜  demo git:(main) ✗ zed .
```

Once Zed is launched, you can run the task to create the sandbox:

And then, every time you open a terminal, you are in the `sbx` shell:

And now, when you start coding in Grain, you can see the LSP server at work:

If the LSP server isn't working, just restart it:

And of course, you can build and run your Grain code:

And if you install **[WasmEdge](https://wasmedge.org/)** in the sandbox:

```
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash
source $HOME/.wasmedge/env
wasmedge --version
```

You'll also be able to use it to run the `hello.wasm` module:

There 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! 🤓

Find the demo code here: [demo](https://rickub.com/webassembly/grain-1st-steps/tree/main/demo)

Written by

Keep reading

### Reproducing the devcontainer DX, but securely with SBX

Connect VS Code over SSH to an sbx sandbox built from kits, for a devcontainer-like workflow with microVM isolation, secrets protection and network policies.

Oct 17, 2026

### Zed Editor + Docker Agent + ACP, but in a sandbox: running the agent with sbx

Run Docker Agent inside a Docker sandbox (sbx) and connect Zed to it over ACP, keeping llmman local while isolating the agent from your machine.

Oct 4, 2026

### Improving the Developer Experience with SBX Kits

Improve the developer experience with sbx kits: reusable sandbox customizations for Go, Node.js, and code-server extensions.

May 1, 2026
From other blogs
