VS Code
VS Code can attach to a workbench two ways: the Dev Containers extension (talks to Docker directly - the most native path) or the SSH attach point. Pick one; both land you in the same container.
Prerequisites: Docker is running and the workbench is applied and up
(monoceros apply acme, check with monoceros status acme).
Option A: Dev Containers extension (recommended)
Section titled “Option A: Dev Containers extension (recommended)”The native VS Code path - no SSH, and it works on Windows/WSL out of the box.
-
Install the Dev Containers extension (Microsoft) from the Marketplace.
-
Open the Command Palette and run Dev Containers: Open Workspace in Container….
-
Pick the workspace file
acme.code-workspacein~/.monoceros/container/acme/.
VS Code opens the generated multi-root workspace inside the container, with a clear root label and a tidied explorer that shows your repos, not the scaffold.
Option B: SSH attach
Section titled “Option B: SSH attach”Uses the SSH host monoceros apply set up for you - the same flow as the
other editors.
-
Install the Remote - SSH extension (Microsoft).
-
Click Open a Remote Window (the
><button at the bottom-left of the window). -
Choose Connect to Host… and pick
monoceros-acme. -
In the new window, run File -> Open Workspace from File… and select
/workspaces/acme/acme.code-workspace.
The host monoceros-acme and its key are written by monoceros apply -
nothing to set up by hand.
Windows / WSL
Section titled “Windows / WSL”Both options work. The Dev Containers extension handles the
Windows-to-WSL-to-container chain itself. For the SSH option, monoceros apply (running in WSL) also writes the Windows ~/.ssh/config entry
and key, so monoceros open acme code and Remote-SSH: Connect to
Host… resolve monoceros-acme from Windows with nothing to set up.
You need Docker Desktop (provides docker.exe) and the Windows OpenSSH
client (bundled since Windows 10).
Your setup persists
Section titled “Your setup persists”Installed extensions and user settings live in named Docker volumes, so
they survive a monoceros apply rebuild - you don’t reinstall after every
change. monoceros remove acme deletes them along with the container.
Editor niceties
Section titled “Editor niceties”- Context-aware extension suggestions. Monoceros recommends extensions that fit the workbench - a DB client when a database service is present, GitHub or GitLab tooling per repo host. Suggestions, never forced.
- No nagging rebuild prompts.
applyonly rewrites the config files VS Code watches when something actually changed, so you don’t get the recurring “configuration changed, rebuild?” prompt on every apply.
Trouble?
Section titled “Trouble?”See the IDE FAQ.