Quickly spin up a disposable, Docker-based dev environment with the tools you need — no manual setup, no polluting your host machine. Pick an environment, get a shell (or a VS Code Dev Container), do your work in a persistent local folder, and throw the container away when you're done.
Works for anyone: no personal configuration is baked in anywhere in this repo.
- Docker — install instructions (Linux/macOS) or Docker Desktop (Windows/macOS)
- jq —
sudo apt-get install jq/brew install jq/winget install jqlang.jq - fzf —
sudo apt-get install fzf/brew install fzf/winget install fzf
Clone the repo first — the menu scripts read the Environments/ folder
locally and need a real checkout (this is also what makes customization and
persistent workspaces possible):
git clone https://github.com/modem7/docker-devenv.git
cd docker-devenvLinux / macOS:
./devmenu.shWindows (PowerShell, no WSL required):
.\devmenu.ps1Pick an environment, choose pull (fast, prebuilt) or build (local Dockerfile + any customizations), pick a workspace folder to persist your work in, and you're in a shell.
| Environment | Base | Description |
|---|---|---|
| Alpine | alpine:edge |
Minimal general-purpose environment |
| Alpine_Python | python:alpine3.17 |
Alpine + Python dev toolchain |
| Debian | debian |
General-purpose, apt-based |
| Ubuntu | ubuntu |
General-purpose, apt-based |
| NodeJS | node:lts-bookworm |
Node.js LTS |
| Go | golang:bookworm |
Go toolchain |
| Rust | rust:bookworm |
Rust + cargo |
| NetworkTools | — | Passthrough to nicolaka/netshoot for network troubleshooting |
Drop extra packages into Environments/<Name>/requirements.local.txt (one
per line, # for comments — same format as the tracked requirements.txt)
and choose build instead of pull in the menu. This file is
gitignored, so your customizations stay local. Doesn't apply to
NetworkTools (it's a passthrough to an upstream image, nothing to build).
Every run mounts a host folder to /workspace inside the container, so
your work survives the container being removed. The menu prompts for a
path (default: ./workspace/<environment>), or set DEVMENU_WORKSPACE
(devmenu.sh) to skip the prompt.
Each Environments/<Name>/ folder includes a .devcontainer/devcontainer.json.
This repo is a utility repo, not something you develop inside directly — to
use an environment as a Dev Container for your own project, copy that
environment's folder (Dockerfile + .devcontainer/, or just .devcontainer/
for NetworkTools) into your project, then use VS Code's
Dev Containers: Reopen in Container.
- Pull downloads a prebuilt multi-arch (
amd64/arm64) image fromghcr.io/modem7/docker-devenv-<environment>— published by CI on every merge tomasterand refreshed weekly to pick up upstream security patches. - Build builds from the local Dockerfile, including anything in your
requirements.local.txt. - Every pull request runs CI: each environment's Dockerfile builds and is
linted with hadolint,
devmenu.shis shellchecked and unit-tested with bats-core, anddevmenu.ps1is linted with PSScriptAnalyzer.
