AI Disruption

AI Disruption

Claude Code in Docker: 10-Minute Setup, No Re-login

Move Claude Code into a Dev Container for isolated, reproducible dev environments. Keep logins across rebuilds with CLAUDE_CONFIG_DIR.

Meng Li's avatar
Meng Li
Sep 13, 2026
∙ Paid

“AI Disruption” Publication 10,500 Subscriptions 20% Discount Offer Link.


A while ago I switched to a new computer. The most annoying part wasn’t installing WeChat — it was restoring the dev environment: Node versions, Python virtualenvs, assorted global configs… it ate half a day.

Then I realized a more practical problem: I routinely let Claude Code run commands in the terminal, and it operates on my host machine. If it ever goes haywire and changes a global config it shouldn’t, I’ll be in tears.

So I moved Claude Code entirely into a Dev Container. That solved both problems at once. Here’s the setup — feel free to copy it.

What it actually is

A Dev Container is basically a Docker container, except your editor (VS Code, Cursor, JetBrains all support this) “climbs inside” to work: you still see the familiar editor UI, but the terminal, language servers, and build tools all run in the container.

Claude Code is installed in the container too. Every command it runs happens inside that “unfinished room,” while its edits to your project files are bind-mounted and synced back to your local repo in real time.

Think of it as drawing a construction zone for the renovation crew: they can hammer all they want — they won’t hit a load-bearing wall.

User's avatar

Continue reading this post for free, courtesy of Meng Li.

Or purchase a paid subscription.
© 2026 Meng Li · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture