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 2 of 47

dloreto4 replies#
Having a deterministic environment, but that is actually running on your laptop is so much better than working inside a docker container. Inside a container the file system is very slow, and you lose all of your other tools and shell aliases.
whiddershins1 reply#
So, that’s what this is?
vhanda2 replies#
I haven't run devbox, but the README says that it requires docker to be installed. This makes me believe it isn't running the programs on my system (macos), but rather in the Linux VM.
jljljl#
It will use Nix to build a shell on your local machine directly, so you can run the program on your system directly (not in a VM).

It also has some early functionality where you can turn that shell into a Docker container, so you can run the same shell + program in other environments or in the cloud

xlix7 replies#
so an abstration on top of docker?

Continue this thread — 7 replies

justinsaccount2 replies#
This is a cool project and yay nix, but:

> Inside a container the file system is very slow
Because you are not using "a container".
You are using a container that happens to be running in a linux VM on your OS X laptop. It's not the containers fault, it's the entire virtual machine that you are running because you're trying to run technology built on top of one operating system while running a completely different one.

endorphine2 replies#
This. Put another way: it's slow only because you're on macOS and not on Linux.
dloreto#
Totally fair.
neop1x#
That's why Linux needs more love.

I find it sad that many people use Docker, but the majority of them run Linux in a VM inside an expensive proprietary platform to do so, sometimes without even realizing it.
Meanwhile, the Linux desktop ecosystem is deteriorating and should be used more and receive more financial support.

throwaway8922382 replies#
Overlay copy-on-write filesystems are slow. I think most container runtimes use them.
baq1 reply#
compared to full-VMs-pretending-to-be-containers everything is fast.

it seems like everybody here is using Macs for development to the point that if you don't say you aren't, you are assumed to be on a mac. Windows with WSL2 is actually pleasant to use, I can recommend trying it out. while WSL2 is a VM technically, the level of integration makes it basically native (if you use the VM disk for your workspace, which you should.)

Continue this thread — 1 reply

justinsaccount#
It's not the COW filesystem that is slow, it's bind mounting the host filesystem into the VM. This ends up using something like 9p or sshfs.
nicoburns2 replies#
What I really want is a tool like docker compose that builds on top of a tool like this (instead of docker)
fancyfaith#
+1
qbasic_forever1 reply#
Assuming you want the service management aspect of docker compose look at user-mode process supervisors like supervisord. You can install it in your nix environment and config all the dependent services it should manage. It's a little more crufty vs. the simplicity of docker compose but it also has a lot more power and flexibility. There are tons of other options to explore too like systemd user services or skarnet's s6 suite.
nicoburns#
What I really want is to be able to do things like spin up an isolated postgres instance to run my unit tests against, with zero config on my part except specifying a postgres version in my "docker-compose.yml" equivalent.
encryptluks2#
File systems inside the container aren't slow unless you're running on Windows or some other virtualization platform that makes it slow.