I get Lando, You get Lando, Everybody gets…
Running Lando from source
On Alpine Windows Subsystem for Linux
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:
Trusting the CA
Updated November 7, 2021
To get rid of the pesky warnings from the browser about not trusting the Lando’s SSL certificate, you can follow the instructions here.
In my case, I need to copy the certificate from the Lando source into the Windows host machine:
Once the certificate is in Windows-land, I can add or remove it using an elevated-privilege command prompt:
# Add the Lando CA
certutil -addstore -f "ROOT" C:\Users\ME\.lando\certs\lndo.site.pem# Remove Lando CA
certutil -delstore "ROOT" serial-number-hex
And after refreshing the Lando site, the red cross over https has been removed from the address bar:
If for some reason the browser cannot find the
.lndo.site domain, just check the instructions over here to rebind your DNS from your local ISP into Google or Cloudfare. If you cannot do it from the browser try updating the connection properties.
- Adapted from instructions in https://docs.lando.dev/basics/installation.html#from-source