I can currently add a .tool-versions file in my project folder and run `asdf install` to get everything on the same versions for all our devs.
elixir 1.13.4
erlang 24.3.4
nodejs 16.4.231–40 of 196 posts
I can currently add a .tool-versions file in my project folder and run `asdf install` to get everything on the same versions for all our devs.
elixir 1.13.4
erlang 24.3.4
nodejs 16.4.2Earlier quoted context omitted.
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.
so an abstration on top of docker?
I wonder if it takes this approach because there's some issue with using Nixpkgs' dockerTools on macOS— those tools let you create Docker/OCI images without even having Docker installed.
Earlier quoted context omitted.
> Of course we could use Docker, but then on Mac our dev process would be 3x slower. Doesn't devbox depend on Docker, though? I figure any performance losses from Docker would happen with this too.
The dependency on Docker only exists for when you want to turn your shell into a container – but it's not otherwise used when you're just running a shell locally. When writing javascript there's often a desire to have "isomorphic" or "universal" applications. Write the code once and run it in _either_ the client or the _server_. Devbox is taking a similar approach to the development environment: declare it once, run…
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.
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 on…
This looks really cool! Can you explain the differences between `asdf` and the .tool-versions file? I can currently add a .tool-versions file in my project folder and run `asdf install` to get everything on the same versions for all our devs. elixir 1.13.4 erlang 24.3.4 nodejs 16.4.2
nix goes the next step and has packages defined as an install script plus all their dependencies (all the way down to the basic C library, compilers, etc.). It caches everything based on a hash and provides a public repository where it will just download prebuilt versions of things instead of compiling them from scratch every time. It can do this because it has extremely strict hermeticity and reproducibility guarantees for all of its packages--asdf has none of this and you'll almost certainly just be compiling tools over and over or pulling down pre-built versions that will probably work (as long as you carefully read the package readme and installed all its dependencies).
Don't get me wrong, asdf is nice and great for simple things. If it works for you keep using it. If you start to run into trouble with the quality of its packages or you start writing your own packages, you might want to look at a more comprehensive system like nix.
what is this sorcery?
A nice porcelain for ad-hoc uses of good ol' `nix-shell`, it looks like: https://github.com/jetpack-io/devbox/blob/main/nix/nix.go#L3... The container export functionality is based on BuildKit via the plain `docker buildx` CLI: https://github.com/jetpack-io/devbox/blob/main/docker/docker... and it uses CUE to validate its configuration, which is JSON. All-in-all it actually looks extremely simple. I guess the basic i…
Earlier quoted context omitted.
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 on…
This. Put another way: it's slow only because you're on macOS and not on Linux.
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.
This looks really cool! Can you explain the differences between `asdf` and the .tool-versions file? I can currently add a .tool-versions file in my project folder and run `asdf install` to get everything on the same versions for all our devs. elixir 1.13.4 erlang 24.3.4 nodejs 16.4.2
Also devbox can dump Docker containers for you