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

Show all comments

Showing thread 6 of 47

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.