I get Lando, You get Lando, Everybody gets…
Running Lando from source
Yesterday morning I wrote an article on installing Lando into Ubuntu WSL 2, using the latest and greatest Docker Desktop (release 3.2.x).
If you are one of the 3 anonymous cats and 1 rottweiler dog that follows this blog, you probably figured out that I’d be a matter of when, not if I would attempt the same on Alpine.
I’m happy to report that it looks like the approach detailed in this story was successful. Earlier today I had tried to install Lando from a
.deb package in Alpine, and that ended up being a horror story of which I’ll spare you the details.
The following dependencies need to be installed in Alpine in order to proceed:
sudo apk add git yarn nodejs
WARNING: Your WSL distro has access to, and will indeed call both Node.js and Yarn if they are installed in your host Windows machine. This is not what you want.
For example, see how Alpine can call Yarn on the Windows host here:
However, if you have in fact installed Yarn inside your WSL distro, the distro binary will supercede the Windows host binary:
Clone git repo from https://github.com/lando/lando:
git clone https://github.com/lando/lando.git
Run yarn install command:
Run Lando command with
Create symlink to the Lando executable in a PATH-visible location such as
sudo ln -s /home/wsl/lando/bin/lando.js /usr/local/bin/lando
Then simply run
Warnings Fus Ro Dah!
According to the GNU manual for the
env utility you should be able to specify arguments for the program invoked in the shebang, however that depends on the platform.
However, as Alpine thinks it’s Gerard Butler on 300, we’re rather well…Spartan:
And the full suite of options for GNU env is not available in our WSL mini-Laconia. Therefore this quick fix will do it:
# Add this to your ~/.bashrc# SUPPRESS WARNINGS ON LANDO SOURCE
bin/lando.js remove the no warnings argument from the environment invocation shebang:
# Change shebang from:
#!/usr/bin/env node --no-warnings# To:
- Adapted from instructions in https://docs.lando.dev/basics/installation.html#from-source