Alternative to proprietary VS Code Dev Containers for VSCodium, Positron, and similar IDEs. Uses Docker + SSH to build/run a container and open your folder inside it.
- Open Folder in Devcontainer (SSH): Builds an SSH-enabled image, runs or reuses the container, configures keys, and opens the folder via Remote SSH.
- Rebuild & Open: Prompts to stop/recreate safely when the container is running.
- From Open VSX Marketplace (recommended for VSCodium/Positron/Theia):
- UI: Extensions view → search for "Codium Devcontainer" → Install
- CLI:
- VSCodium:
codium --install-extension DDorch.codium-devcontainer - Positron:
positron --install-extension DDorch.codium-devcontainer
- VSCodium:
- Open VSX page: https://open-vsx.org/extension/DDorch/codium-devcontainer
- From GitHub Releases (for VS Code or offline):
- Download the latest
.vsixfrom https://github.com/DDorch/codium-devcontainer/releases/latest - Install the VSIX:
- VS Code:
code --install-extension ./codium-devcontainer-X.Y.Z.vsix - VSCodium/Positron:
codium|positron --install-extension ./codium-devcontainer-X.Y.Z.vsix - UI: Extensions view → “…” menu → Install from VSIX…
- VS Code:
- Download the latest
- Docker installed and daemon running.
- A local SSH public key available (e.g.,
~/.ssh/id_ed25519.pubor~/.ssh/id_rsa.pub). - Open Remote - SSH extension installed
- Create a devcontainer config:
{
"image": "mcr.microsoft.com/devcontainers/javascript-node:22"
}- Use the Command Palette or status bar:
- Devcontainer: Open Folder in Devcontainer (SSH)
- Devcontainer: Rebuild & Open
- Click the status bar “Devcontainer” item for quick actions.
- image: Base image used as
BASE_IMAGEfor the build. - remoteUser: Effective/SSH user inside the container. Optional; auto-detected if omitted.
- postCreateCommand: String or array. Injected as Dockerfile
RUNsteps during image build. - postStartCommand: String or array. Executed in a terminal when each remote session starts.
- Build Phase:
- Generates a temporary Dockerfile from the template, sets
BASE_IMAGEto yourimage, and appendspostCreateCommandasRUNsteps. - Stages a small entrypoint that starts
sshd, builds the image, then removes the staged and temporary files.
- Generates a temporary Dockerfile from the template, sets
- Run Phase:
- Starts the container, bind-mounts your folder to
/workspace/<folder>, sets the working directory, and exposes SSH on a random localhost port. - Adds your SSH public key and chooses the effective user (
remoteUserif provided, otherwise auto-detected).
- Starts the container, bind-mounts your folder to
- Open Workspace:
- Creates an SSH host alias and opens the folder inside the container over Remote SSH.
- Lifecycle:
- Reuses the per‑project container when possible; if
.devcontainer/devcontainer.jsonchanged since creation, prompts you to rebuild. - Runs
postStartCommandin a terminal when each remote session starts. - Stops the container shortly after the session ends.
- Reuses the per‑project container when possible; if
- Debian/Ubuntu images recommended (template installs
openssh-serverviaapt). - Single container only;
dockerComposeFileand multi-service setups are not supported. - Build settings in
devcontainer.jsonare ignored:dockerFile,build,context,args,target,featuresare not read. The extension always builds from its template usingimageas the base. - Runtime settings like
mounts,runArgs,containerEnv,init,privileged,capAdd,securityOpt,forwardPorts/portsAttributesare not applied. - Lifecycle commands other than the two listed are not supported:
onCreateCommand,updateContentCommand,postAttachCommandare ignored. - No authoring tools for
devcontainer.json. - One container per project name; the extension reuses it when possible.
- Docker volumes are not managed (bind mounts only).
Please open issues for feature requests for leveraging more devcontainer.json settings.
See contributing guide for local testing instructions.
- Devcontainer: Add Dockerfile Template — creates
.devcontainer/Dockerfilefrom the template. - Devcontainer: Open Folder in Devcontainer (SSH) — builds with
BASE_IMAGE, runs/reuses with SSH on a random local port, configures your key, and opens the folder over SSH. - Devcontainer: Rebuild & Open — forces rebuild and safe recreate when needed.
- Devcontainer: Open Devcontainer Configuration — opens
.devcontainer/devcontainer.json.- Note: Explorer context menu entries appear only when
.devcontainer/devcontainer.jsonexists.
- Note: Explorer context menu entries appear only when
- SSH connection issues:
- Firewalls or corporate endpoint protection can block localhost SSH connections; temporarily disable or add an allow rule if needed.
- Remote - SSH missing: the command will prompt to install it. If it isn't available in your marketplace, use "Devcontainer: Build & Run" and work via the opened SSH terminal, or manually connect with your preferred SSH client to
<user>@localhost:<port>(the user is eitherremoteUseror detected viawhoami). - No public key found: you will be asked to select a
*.pubkey. - Docker permissions: ensure your user can run Docker commands without sudo.
Development setup, testing, packaging, and release instructions are in CONTRIBUTING.md.
See NEWS.md for release notes.
This project is licensed under the MIT License.
See LICENSE for the full text.
This extension is inspired by Andrew Heiss’s blog post:
Heiss, Andrew. 2025. “Use Positron to Run R Inside a Docker Image Through SSH.” July 5, 2025. https://doi.org/10.59350/fredm-56671.