Chris Wiegman

Fixing Lando Crashes in Docker Desktop

/images/2021/07/Screen-Shot-2021-07-21-at-9.31.35-AM.png

If you use Lando and Docker for web development you might have noticed a problem in the last few weeks. In my case this manifested as the following screenshot during lando start:

{{0xc0013c6870 0xc0013c6870 /images/2021/07/lando-crash-message.png  The trace output of Lando crashing on start due to an error in your Docker config. The trace output of Lando crashing on start due to an error in your Docker config. 0xc002a73320} 0 true}

The issue itself can be summed up in the following error message:

services.app.env_file must be a string

or

services.appserver_nginx.labels.traefik.http.routers.51ceda58f85aacb14f0ba2e83c578df12f64202b-secured.tls must be a string, number or null

The issue is actually due to a change in Docker Desktop that released in version 3.4 for Mac. This is because Docker has started including Docker Compose as part of the core Docker CLI (you can read about the full change here).

Fortunately the fix is pretty easy. In Docker Desktop simply go to Settings->Experimental Features and turn off “Use Docker Compose V2.” Then restart Docker and launch your Lando application.

{{0xc0013c6870 0xc0013c6870 /images/2021/07/Screen-Shot-2021-07-21-at-9.31.35-AM.png Uncheck 'Use Docker Compose V2' in 'Experimental Features' Uncheck ‘Use Docker Compose V2’ in ‘Experimental Features’ Uncheck ‘Use Docker Compose V2’ in ‘Experimental Features’ 0xc003682a20} 1 true}
Uncheck 'Use Docker Compose V2' in 'Experimental Features'