6 ms·
Show HN: Devbox – Containers for better dev environments
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 https://devbox.ar0.eu/install.sh | bash`.
Check out the launch page and docs at https://devbox.ar0.eu https://devbox.ar0.eu, or the repo at https://github.com/itzCozi/devbox https://github.com/itzCozi/devbox. I'd love some feedback, stars, or contributions to help grow this into a solid community tool!
- v3ss0n 1y agoThere are already dev containers
- ranger_danger 1y ago"There is already the Ford Model T"
- dbunskoek 1y agoLooks 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 https://www.jetify.com/devbox that also received quite some attention on HN a while ago https://news.ycombinator.com/item?id=32600821 https://news.ycombinator.com/item?id=32600821
- kasajian 1y agoYep, also Microsoft Dev Box: https://azure.microsoft.com/en-us/products/dev-box https://azure.microsoft.com/en-us/products/dev-box
- mcny 1y agoI am not affiliated with Microsoft and I anal but I think dev box is fine. What we want to avoid is the term dev containers. https://containers.dev/ https://containers.dev/
- bryanlarsen 1y agoThe overlap with Jetpack's devbox name is not fine. Not morally, given the massive overlap in functionality between the two implementations. At the very least, their existence will prevent you from getting a trademark. Both projects even use devbox.json for their definitions, for crying out loud. If your usage is not compatible with Jetpack's devbox.json, please switch to a different filename ASAP.
- TheRealBadDev 1y agoI didn't realize our similarities until after i designed like all of it, i didnt do any research before hand sadly causing a lot of issues like this
- swiftcoder 1y ago> I anal There has to be a better way to phrase this
- HatchedLake721 1y agoI think it’s reasonable. What’s another way, “I’m into backdoor stuff”?
- swiftcoder 1y ago
- l___d__s 1y agoFYI there's a well-starred, corporate-backed, similar functionality, Nix-based product with the same name: https://github.com/jetify-com/devbox https://github.com/jetify-com/devbox https://www.jetify.com/devbox https://www.jetify.com/devbox
- techn00 1y agoI thought that OP linked this devbox since so many subcommands from the cli are almost identical
- TheRealBadDev 1y agoAgain another oversight i also didnt relise i was mirroring docker commands and npm.
- gf000 1y agoI usually don't take name clashes as seriously as some people here do, but when it's even in the same general niche, then that's not really a good look. It means the author failed to check the prior art - which is still fine for a (n+1)th hobby project, but not really for something more serious.
- d3Xt3r 1y agoThat looks similar to Flox, which is also Nix-based. https://github.com/flox/flox https://github.com/flox/flox
- bomewish 1y agoYep this was super confusing. definitely change the name!
- evertheylen 1y agoI 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?
- dns_snek 1y ago> does your project attempt to provide any isolation security-wise? Considering that they provide Docker-in-Docker by default, this would have to be a "no" right now. Having the ability to launch Docker containers is equivalent to having root access on the Docker host by default.
- NitpickLawyer 1y agoWe'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?
- whinvik 1y agoYes, it feels very similar to Devcontainers. But having tried Devcontainers a lot, it feels like its probably a complex specification since outside of VSCode every implementation has issues. The CLI on Mac has weird user permission issues. Cursor's implementation is very flaky. Zed doesn't implement it yet. So maybe there's space for more solutions in the same space but Devcontainers are very feature rich. And not to mention they have a huge user base via VSCode.
- NitpickLawyer 1y agoThe killer combo for us is remote+devcontainers. We use this for GPU access, so you can run a project on one or more GPUs that are on a remote server. You can spin up LLM stuff from a mac air and get the best of both worlds.
- runelk 1y agoNice! Do you have any tips or recommendations for a decent setup?
- phrotoma 1y agoThis has been my experience. I don't use VSCode and every time I've attempted to play with devcontainers I've just given up and gone back to a docker compose file. I love that they tried to extract the feature out into a stand alone thing, but the juice doesn't seem to be worth the squeeze yet.
- immutology 1y agoDevcontainers work nicely with docker compose. It's the only way I use it... Really nice to have it all run containers. https://code.visualstudio.com/docs/devcontainers/create-dev-container#_use-docker-compose https://code.visualstudio.com/docs/devcontainers/create-dev-...
- globular-toast 1y agoI 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?
- Gabrys1 1y agoC libraries are easiest to install system wide. The situation with multiple versions of libc is tricky to work with. Not impossible, just not easy to comprehend by an average dev.
- globular-toast 1y agoI'm kinda horrified to think there might be people writing C who don't know how to handle library versions. Somehow I don't think that is the target audience here, by I might be wrong.
- Gabrys1 1y agoYou might need to install libxml2 in order to use XML parsing library for your high level programming language. You don't need to be writing C code to be affected by the dependency hell.
- wiether 1y agoIsolation works both ways. By isolating your dev project, you don't expose your host to the mess the project can create... and you don't expose your project to the mess that can exist on your host. With dev containers, you can define your ENV VAR, your aliases... independently from what exists on your host. And it will exists straight out the box: you checkout the project, launch the dev container and you're ready to go. As soon as you're done with this project, you delete the container and not a single trace of the project exists on your host. No matter how many custom things the project required to run.
- vivzkestrel 1y agohow does it compare to testcontainers? https://www.npmjs.com/package/testcontainers https://www.npmjs.com/package/testcontainers
- yakshaving_jgt 1y agoAnything to do with "dependency hell", I can't see a better solution than Nix.
- parham 1y agoI’ve been doing a version of this using bash scripts for a long time! Thanks for making it
- tiku 1y agoIt's good that we get more options. I like ddev, will try this as well.
- bootsmann 1y agoHow does this compare to toolbx? (https://containertoolbx.org/ https://containertoolbx.org/)
- dirkc 1y agoI'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?
- TheRealBadDev 1y agoYes hypothetically i haven't tested it but i am not sure why it wouldnt aside from machine constraints
- samoit 1y agoThere is also Devpod with a nice UI. https://devpod.sh/ https://devpod.sh/
- jbverschoor 1y agoPlugging 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 https://github.com/jrz/container-shell
- poopsmithe 1y agoerm, that name is already taken. https://jetify-com.vercel.app/docs/devbox/ https://jetify-com.vercel.app/docs/devbox/
- tomas789 1y agoOP should consider changing their alias.
- TheRealBadDev 1y agoToo deep in and i also make projects for a week then abandon them for a while so its not very much worth it i dont think
- kekqqq 1y agoI 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 https://www.jetify.com/devbox.
- TheRealBadDev 1y agoYeah... i didn't realize this was a project before hand, do they use their own container framework? seems like too much for my small project but i can apricate your input.
- jonotime 1y agoWould love to use something like this for NixOS as an escape hatch, but its debian only. DistroBox always gives me trouble.
- guerra 1y agoI thought you are talking about https://github.com/jetify-com/devbox https://github.com/jetify-com/devbox :D
- darkvertex 1y agoSo this reinvents devcontainers? https://containers.dev https://containers.dev Why should we use yours? What does it do better or differently?
- hk1337 1y agoWhile this is true, this project seems to wrap it up in a CLI package for starting and stopping projects. Whereas starting devcontainers, at least as far as I have seen, is always done via VSCode or IDE, so while it technically could be called CLI too, would be a lot more complicated than this project.
- bartalama 1y agoThere is also a CLI for dev containers. I use it for unattended builds.
- nickzelei 1y agoThe devcontainers cli has existed for a while. Definitely not as smooth as using with vscode but it has all the main points. https://github.com/devcontainers/cli https://github.com/devcontainers/cli
- hk1337 1y agoTIL. I'm not proponent of installing nodejs apps globally, npm install -g or yarn install -g
- clueless 1y agoAmazing amazing project, thank you for sharing this
- TheRealBadDev 1y agoOh! thank you for your appreciation means a lot.
- exasperaited 1y agoI 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.
- TheRealBadDev 1y agoHello!! 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/d05c8980db7fb907f3113b63ece2674f8863d6b9 https://github.com/itzCozi/devbox/commit/d05c8980db7fb907f31...