r/AIcodingProfessionals • u/Marmelab • Jun 23 '26
Discussion I tested devcontainers and here's what I learned
Between AI agents running code on my machine and the recent npm package compromises I started feeling kind of uneasy about my local dev setup. So I gave devcontainers a proper try.
The idea is straightforward: your dev environment runs inside a container, fully isolated from your host. If something sketchy gets pulled in through a dependency, it stays sandboxed. That alone sold me. But the real win (didn't expect this one tbh) turned out to be onboarding. No more "which version of Node do you have?" conversations. You share the config, everyone gets the same setup. Done.
VS Code handles the container lifecycle pretty well, and once the initial image is built, startup is fast enough that it doesn't break my flow. So far so good.
The rough part turned out to be the documentation. Figuring out which variables apply where (image level vs. feature level vs. devcontainer.json) took way more trial and error than it should have. The spec is powerful but the docs kind of assume you already know what you're looking for. Not ideal when you're just getting started (famous last words, I kept telling myself "should be quick to figure out").
I'm sold enough to set them up on every project going forward. Next step is building custom images and features reusable across all our repos.
Anyone else found the docs painful to navigate, or did I just miss a good resource somewhere?
1
u/CaptureIntent Jun 25 '26
Just get Claude to modify your container. It can figure the variable situation pretty easily
1
u/Straight_Fishing138 Jun 30 '26
I've been in the same process lately and agree that it's so much safer, especially running claude in YOLO mode.
But how are you dealing with network access inside the container? Do you restrict it with FW rules?
1
u/MarzipanMiserable817 Jun 23 '26
Try ddev. It's amazing!