Right now I am using asdf and it takes 30+min to build/install a specific version of erlang. Is there any alternative? Maybe a way to install it pre-compiled?
asdf
uses kerl
under the hood to manage the erlang version. I’m not aware of using a precompiled version with it.
Use the Erlang Solutions repo to install as a package.
You can not switch versions with it. Somehow contradicts the usage of asdf
.
Question was about new VM, so I assumed there is no preinstalled version. This is how my development Vagrant setup installs Erlang: https://gitlab.com/Nicd/elixir-vagrant-setup/tree/master/vagrant_provision.sh
Yeah, hard to say then…
If it is about bootstrapping a new deployment target, I’d not install erlang at all but use releases with ERTS embedded.
If it is about bootstrapping a new development VM, I’d probably just copy a prebuilt asdf
folder from a compatible VM. Or drop all the VM stuff at all and just develop on a linux host, dropping the necessity to re-install erlang for each and every project…
I had the same issue for one of my clients and I had to build one container previously with all heavy system dependencies necessary, using that as the base-container, I had to use the application code and deploy it. Not sure, if that’s the best practice, but it solved our erlang build time issue.
If I need to change erlang version, I used to change it in the base-container only once and my application container needs to pull the latest container and since it’s a one time issue, I didn’t bother to explore further.