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.

Pre-requisites

The following dependencies need to be installed in Alpine in order to proceed:

  1. Yarn
  2. Node.js
  3. Git
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:

Installing Lando

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 node bin/lando.js:

Create symlink to the Lando executable in a PATH-visible location such as /usr/local/bin :

sudo ln -s /home/wsl/lando/bin/lando.js /usr/local/bin/lando

Then simply run lando:

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
export NODE_NO_WARNINGS=1

And on bin/lando.js remove the no warnings argument from the environment invocation shebang:

# Change shebang from:
#!/usr/bin/env node --no-warnings
# To:
#!/usr/bin/env node

Organic, fair-sourced DevOps and Full-Stack things. This is a BYOB Establishment — Bring Your Own hipster Beard.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store