News for hackers. Stuff that matters.
Re:Asdf – the language tool version manager by matsemann on Monday October 24, 2022 @07:44PM (#33324190)
While asdf solves lots of pains, I still feel it solves the wrong problem. What I've instead started to do is to build docker images for various needs. Like, multiple of our projects need terraform, but all different versions. A project should then include that in its dev-dockerfile. No setup, just git clone a project and ready to go. No messing around with "to install and run X you need to have Y already installed, which half of you don't so for some reason it wont work in your environment".
Re:Asdf – the language tool version manager by nicoburns on Monday October 24, 2022 @07:59PM (#33324332)
That’s all well and good if you’re on Linux, but docker is super slow on Mac and windows. I’ve often worked places that develop iOS apps, s were stuck on macs, and thus alternatives to docker are very welcome.

Asdf can automatically install tool chain versions based on a plain text file stored in your repository, so it’s pretty plug and play too.

Re:Asdf – the language tool version manager by matsemann on Tuesday October 25, 2022 @02:43AM (#33327051)
I feel docker is super fast on windows, as long as the files you mount are on wsl side. For instance most of my npm stuff is even faster there than lots of small files on Windows side.
Re:Asdf – the language tool version manager by cdubzzz on Tuesday October 25, 2022 @07:57AM (#33329331)
VirtioFS[0] is making a _huge_ difference on the macOS side. I hated using Docker on macOS for a long time and started testing it as soon as it came out. Had some bad bugs initially and apparently does still have kinks being worked out but I’ve been using it consistently for a few months now and actually forgot all about how terrible the experience used to be. It is such a great improvement.

[0] https://www.docker.com/blog/speed-boost-achievement-unlocked...

Re:Asdf – the language tool version manager by JamesSwift on Monday October 24, 2022 @07:58PM (#33324325)
Agreed, I tend to treat my raw system as read-only and I much prefer it this way. Not only do I get the reproducibility, I also get the ability to more easily prune unused software.
Re:Asdf – the language tool version manager by e12e on Monday October 24, 2022 @07:55PM (#33324305)
Works well without docker installed, does it? ;)
Re:Asdf – the language tool version manager by maple3142 on Monday October 24, 2022 @08:47PM (#33324732)
I get using docker is more painless, but I still prefer running things outside of a container when the setup isn't too complex. It is mostly because I have some heavily customized dev environment including zsh and all other tools installed, so developing in docker always make me miss a lot of things.
Re:Asdf – the language tool version manager by JamesSwift on Tuesday October 25, 2022 @01:06PM (#33333315)
In that case, if you can get it running in nix then thats an even better option.
Re:Asdf – the language tool version manager by AlchemistCamp on Monday October 24, 2022 @09:13PM (#33324921)
Asdf is a great boon when upgrading language versions in a git branch and needing to switch back and forth between that branch and another feature branch without the upgraded language version.

Switching back and forth between branches with .tool-versions seamlessly switches to the correct version of the language and it “just works”. Trying to accomplish the same purely via docker is slow and painful.

Re:Asdf – the language tool version manager by computerlab on Monday October 24, 2022 @09:34PM (#33325076)
tfswitch might help with particular issue of terraform versioning:

https://tfswitch.warrensbox.com/

Even then some versions of terraform providers are not compatible with M1 macs. Docker would help with that probably, but so can: https://github.com/kreuzwerker/m1-terraform-provider-helper

Perhaps these sort of issues support the benefits of per-module docker images?

Re:Asdf – the language tool version manager by kubanczyk on Wednesday October 26, 2022 @04:12PM (#33348743)
> No setup, just git clone a project and ready to go.

Okay, a worthy target.

> No messing around

I will list layers that I guess you are using:

docker client binary

a command to run the thing <---

user-specific docker configuration

docker daemon as root

system-specific dockerd configuration

Dockerfile

embedded in it, a small shell script to download Terraform binary <---

files scattered on /var/lib/docker/* which never require cleanup

dns implementation

virtual bridge and other kernel-ish entities

tcp proxy

a running Terraform binary <---

I marked the layers that, in my opinion, would be enough to achieve the same goal. The explanation is that terraform is a self-contained binary that is not trying to scan system-wide or homedir-wide for files that can and will break it into dozen pieces. It is confined to the repo.