DevContainers
Podman containers with custom development environments for VSCodium using DevPod and 3timeslazy.vscodium-devpodcontainers extension.
Create your own
The definition of the devpod is done in the folder .devcontainer with the file devcontainer.json. In this folder there can be other files like scripts or Dockerfile/docker-compose.yml.
- Dev Container Specs
- Dev Container Templates - Github Really good source of inspiration.
- Dev Container Templates - Web
- Dev Container Features
- 3timeslazy VSCodium DevPod Containers extension README.md
To create the absolute bare minimum DevPod you need to:
1. Define it in .devcontainer/devcontainer.json. Not all images will work out of box.
.devcontainer/devcontainer.json
---
{
"name": "boringproblem",
"image": "python:3.13-trixie",
"remoteUser": "root"
}
- In VSCodium open the Command Palette and select DevPod Containers: Open in Container.
- The container will be built and the workspace will reopen inside the DevPod.
I had to remove ForwardAgent yes from ~/.ssh/config on the newly added entry at the top because I do not have the ssh agent running by default.
Create an advanced image
The creators of Devcontainers offer some nice features with basic functionality to get started quickly.
.devcontainer/devcontainer.json
---
{
"name": "boringproblem",
"build": {
"dockerfile": "./Dockerfile",
"context": "."
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "true",
"username": "boringproblem",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "true"
}
},
"customizations": {
"vscodium": {
"extensions": {
"ms-python.python": {}
}
}
},
"postCreateCommand": "bash ./.devcontainer/post_create.sh",
"remoteUser": "boringproblem"
}
Create a Dockerfile to create a custom image. This example is a little silly because the feature defined in devcontainer.json (ghcr.io/devcontainers/features/common-utils:2) will create the user.
.devcontainer/Dockerfile
---
FROM python:3.13-trixie
RUN apt update && apt upgrade && apt install -y curl git bash
RUN useradd -m -s /bin/bash boringproblem
USER boringproblem
Create a script to run after creation inside the DevPod.
Open the workspace in a DevPod from VSCodium and it will build the image and create the container.
Examples
- Dev Container official templates
- Visual Studio Code's documentation on creating a Dev Container
- Introduction to dev containers in Github Codespaces
- vscode-remote* git repos from M$
- Microsoft Artifact Registry
- Source of pre-built dev containers from mcr.microsoft.com (Microsoft Artifact Registry)
- Golang development container
- Rapidsai Dev Containers
- claude-code
- claude-code-sandboxed-template-vscodium
- microsoft/vscode-remote-try-python/.devcontainer/devcontainer.json
- DevPod's own Github Codespace devcontainer definition with k9s and minikube
Future work
Nix in devcontainers https://mischavandenburg.com/zet/installing-packages-in-devcontainers-with-nix/