Show HN: Devbox – Containers for better dev environments

devbox.ar0.eu

113 points by TheRealBadDev 2 days ago


I've been frustrated with dependency hell and clutter on my VPS from dev, so I built Devbox: a lightweight, open-source CLI tool that spins up isolated development environments using Docker. Each project runs in its own container, but your code stays in simple flat folders on the host machine—no messing with volumes or sync issues. Environments are disposable, so you can nuke and recreate them without losing your work. Key features: - Instant setup: `devbox init my-project` and you're in a fresh env with `devbox shell`.

- Configurable via JSON: Define packages, services, and more in a `devbox.json` file. Share it in your repo for reproducible setups—teammates just run `devbox up`.

- Docker-in-Docker by default: Build and run containers inside your env without extra config.

- Host-friendly: Edit code directly on your machine; the container handles the runtime.

- Templates for quick starts: Built-ins for Python, Node.js, Go, web dev, etc.

- Advanced options: Port mapping, env vars, resource limits, and even mounting your dotfiles.

It's FOSS (MIT license), Linux-focused (Debian/Ubuntu, or WSL2 on Windows), and super easy to install: `curl -fsSL https://devbox.ar0.eu/install.sh | bash`.

Check out the launch page and docs at https://devbox.ar0.eu, or the repo at https://github.com/itzCozi/devbox. I'd love some feedback, stars, or contributions to help grow this into a solid community tool!

l___d__s - 2 days ago

FYI there's a well-starred, corporate-backed, similar functionality, Nix-based product with the same name:

https://github.com/jetify-com/devbox https://www.jetify.com/devbox

dbunskoek - 2 days ago

Looks like a really fun project. You might want to reconsider the name though, since there is this other devbox from Jetify https://www.jetify.com/devbox that also received quite some attention on HN a while ago https://news.ycombinator.com/item?id=32600821

NitpickLawyer - 2 days ago

We've been using devcontainers for this, as it's already got good support in vscode. Could you perhaps "elevator pitch" the main differences between devbox and devcontainers?

darkvertex - 2 days ago

So this reinvents devcontainers? https://containers.dev

Why should we use yours? What does it do better or differently?

bootsmann - 2 days ago

How does this compare to toolbx? (https://containertoolbx.org/)

kekqqq - 2 days ago

I had a very strong personal opinion that, unless you expect frequent migrations or horizontal scaling, Docker is overkill and could be considered as bloat in many instances. After I joined my new company, I found out about devbox, and I love it. Now I use it for almost every personal project. It helps you to make the environment reproducible without sacrificing performance.

However, I use https://www.jetify.com/devbox.

evertheylen - 2 days ago

I always like to see new projects using containers. Two questions:

- how is your devbox.json file different from a Dockerfile/Containerfile?

- does your project attempt to provide any isolation security-wise?

TheRealBadDev - a day ago

Hello!! All of your concerns have been addressed in a new commit of mine which is available to all of you now.

Added GPU pass‑through, engine‑agnostic containers (DEVBOX_ENGINE for Podman/rootless), and alternate config filenames to avoid Jetify collisions—while keeping a tiny, CLI‑first flow that works outside VS Code.

https://github.com/itzCozi/devbox/commit/d05c8980db7fb907f31...

poopsmithe - 2 days ago

erm, that name is already taken. https://jetify-com.vercel.app/docs/devbox/

guerra - 2 days ago

I thought you are talking about https://github.com/jetify-com/devbox :D

jbverschoor - 2 days ago

Plugging my own tool. I use it for development and running semi-trusted or temporary tools, mounts the current/project dir for isolation, and shuts down automatically when it can.

Container Shell - https://github.com/jrz/container-shell

dirkc - 2 days ago

I've been using Docker containers for quite some time to do web dev work. The one thing I haven't yet set up is doing mobile dev in a docker environment.

Does devbox support mobile development - Flutter or ReactNative?

jonotime - 2 days ago

Would love to use something like this for NixOS as an escape hatch, but its debian only. DistroBox always gives me trouble.

globular-toast - 2 days ago

I don't get how containers address "dependency hell". Is there some language that only supports installing libraries system wide? I've used a lot of different languages and yet to come across one.

I've worked on projects where the original dev has used containers for everything. It's super clunky and annoying. I don't want to use a different bash config just for working on that project. I've set my own up for a reason. All it makes me wonder is what are you afraid of? Why do you feel the need to isolate dev projects to this extent?

tomas789 - 2 days ago

OP should consider changing their alias.

parham - 2 days ago

I’ve been doing a version of this using bash scripts for a long time! Thanks for making it

v3ss0n - 2 days ago

There are already dev containers

tiku - 2 days ago

It's good that we get more options. I like ddev, will try this as well.

vivzkestrel - 2 days ago

how does it compare to testcontainers? https://www.npmjs.com/package/testcontainers

clueless - a day ago

Amazing amazing project, thank you for sharing this

samoit - 2 days ago

There is also Devpod with a nice UI.

https://devpod.sh/

exasperaited - a day ago

I am afraid that despite all these options for containers, I still use my Vagrant scripts that build whole VMs based on my own schemes, use an apt package cache on the host and manage .ssh/config for me to make VSC remotes more seamless.

Almost all my stuff still runs on simple VMs because I cannot rely on my clients to take on more complex cloud infrastructure and I don't want to be stuck managing all of the things forever, so my life involves building customer VMs from build scripts that are adequately similar to my Vagrant boxes.

I use the VMs a lot for simple tests (e.g. of wordpress plugins and themes) so I have gone to the trouble of setting up Avahi with alias support, adding options for mailhog, different databases, different webserver setups I use for WP or Laravel or node.js, setting up an automated WP install etc.; so there are two or three starting configurations. I even had one for Magento before I realised I could be a lot happier without Magento in my life.

I guess it looks a fair bit like devcontainers now, and I should consider migrating over to that. But it's solid and under my control and that counts for a lot.

yakshaving_jgt - 2 days ago

Anything to do with "dependency hell", I can't see a better solution than Nix.