A collection of devcontainer configurations for different projects. I use and tested these with VSCode and Podman. All templates use official images, run as non-root user, and keep your host filesystem clean.
- deno - For Deno projects
- node - For Node.js projects (with pnpm)
- python-uv - For Python projects using uv
- monorepo-uv-pnpm - For projects with both Python (uv) and Node.js (pnpm)
You can use these templates in two ways (choose the one you like!). For example, if you want to use the monorepo-uv-pnpm template:
- Make sure you have Dev Containers extension installed in VS Code.
- Press
F1to open Command Palette and runDev Containers: Add Dev Container Configuration Files....
- Select "Add configuration to workspace" or "Add configuration to user data folder".
- Next, when it asks to select a template, paste the template's URL:
ghcr.io/cheapnightbot/moe-dev-configs/monorepo-uv-pnpm:latest. - Important: Create required directories before reopening in container:
mkdir -p frontend/node_modules backend/.venv
- Press
F1and runDev Containers: Reopen in Container.
Alternatively, you can use the Dev Container CLI to apply a template:
devcontainer templates apply \
--template-id ghcr.io/cheapnightbot/moe-dev-configs/monorepo-uv-pnpm \
--workspace-folder /path/to/your/project- Copy the
.devcontainerfolder from the template you want (e.g.src/monorepo-uv-pnpm/.devcontainer) to the root of your project.
- Create required directories. See Important Notes below.
- Optionally, modify
.devcontainer/devcontainer.jsonand/or.devcontainer/compose.ymlas needed (add extensions, expose ports, etc.).
- Make sure you have Dev Containers extension installed in VS Code.
- Press
F1to open Command Palette and runDev Containers: Reopen in Container.
Me think you can also use in GitHub Codespaces, but I did not try it ~
For Podman, make sure to set userns to keep-id. Me simply set it in containers.conf file instead of compose.yml. You can check Podman docs for more information. But here quickly how to set it:
sudo vi /usr/share/containers/containers.conf- Then find the line that says
#userns = "host"(you can press/key, typeusernsand press enter/return key to find it), replace it withuserns = "keep-id".
Also make sure to create node_modules and .venv directories on the host before running/opening in the devcontainer to prevent permissions for these folders on host:
No modules / packages will be saved inside these folders on the host. But they need to exist on the host.
- For deno and node, create
node_modulesat the root of the project folder on the host. - For python-uv, create
.venvat the root of the project folder on the host. - For monorepo-uv-pnpm, create
node_modulesinside the "frontend" directory &.venvinside the "backend" directory.