Lurker News
Devbox is a command-line tool that lets you easily create isolated shells and containers. You start by defining the list of packages required by your development environment, and devbox uses that definition to create an isolated environment just for your application.

In practice, Devbox works similar to a package manager like yarn – except the packages it manages are at the operating-system level (the sort of thing you would normally install with brew or apt-get).
See it in action: https://youtu.be/WMBaXQZmDoA

Comments (185) 47 threads

Earlier comments
rodrigodlu#
There are also some rough edges that you need to take care.

For instance, my nix installation `locale` was not `UTF-8` (after the first `devbox shell` run), but all my tools and code needs the locale to be UTF8. When you quick check `locale` after `devbox shell` it keeps returning to your host shell locale instead of the nix one, so you can easily be fooled by which layer you're really running. `which` command also loses its purpose.
Then you need an extra step to fix the locale: https://nixos.wiki/wiki/Locales
Then you find other similar issues that need to be taken care, like conflicts with `rbenv`, `poetry` and so on.
It's an awesome idea, but with `docker`, `podman` or fedora's `toolbox` I have some more certainty on what it's running.
With `docker` you can `docker inspect` or something like that. `devbox shell` tries to merge the nix layer with my own shell in a not predictable way.
Anyway, nice project indeed.

TekMol2 replies#

    A consistent shell for everyone on the team

    Declare the list of tools needed by your project via a
    devbox.json file and run devbox shell. Everyone working
    on the project gets a shell environment with the exact
    same version of those tools.
Why not just use a Dockerfile?
kreetx3 replies#
Dockerfiles are repeatable but they are not reproducible - they don't give you the same version of everything every time you run them.
fragmede1 reply#
You're right, but it depends on workflow. IMO they should be pulling the docker image itself and not building the container from the Dockerfile.
kreetx#
It depends on other external circumstances, but other benefits for nix would be: - they could pull less data (nix configuration is smaller than docker binary blob), - nix is entirely deterministic (docker depends on whenever that image was built), - nix implicitly its components for if there are many of these dev shells, and also with your main system. Yes, Dockerfiles can also be chained but if the later levels of these are rebuilt, the the earlier ones better have new enough versions installed (i.e it's a can of worms and the entire chain needs to be rebuilt anyway)
KingJulian#
This is where version pinning comes in. Most base images use specific versions of packages.
pinglin1 reply#
One can absolutely lock versions in their Dockerfile. I can see that the design principle of DevBox is to pin the versions. At the end of the day we all need to consider versioning (i.e., the image version) the versions (i.e., package versions) anyway.
ParetoOptimal#
Reproducible Docker is fighting an uphill battle, Nix and it's ecosystem tries to be reproducible by default.

Dockers ecosystem aims more for repeatable, not reproducible.
> At the end of the day we all need to consider versioning (i.e., the image version) the versions (i.e., package versions) anyway.
The granularity of pinned versions and feasibility of having a culture of everything being pinned versus needing to know a crazy amount of things that need pinned a big difference.

ignoramous1 reply#
Thanks.

> Devbox was originally developed by jetpack.io and is internally powered by nix.
If this wasn't mentioned, I'd have easily mistaken devbox to be an escaped implementation of Brazil VersionSets and Apollo VersionFilters (used internally at Amazon).
If I may, in the near-term does jetpack.io plan to continue to use and sponsor devbox's development? And, in the long-term, does jetpack plan to monetize this project, or donate it to a foundation, or some such?

dloreto1 reply#
Yes, we use it internally for all of our development and plan to continue actively maintaining it. If there's enough interest from the community we would love to make it a Cloud Native Computing Foundation project.
the_duke#
Small bit of feedback: as a Nix fan and user I love to see a more usable veneer over nix tooling, but I feel the repo should give a bit more credit to Nix and explain how Devbox works.
m1keil#
Nix shells is a killer feature so it seems smart to me to create a wrapper around it to simplify the experience. On the other hand, it's another layer of abstraction that you need to learn and debug when stuff breaks.

Will definitely keep and eye on this.

Load more comments