Tell us about your setup
I have tried to install Lando, both on the Windows side and then from WSL following the directions at this url: https://blog.jayway.com/2017/04/19/running-docker-on-bash-on-windows/
I have the Windows 10 Creators update (Version 1703) which should allow me to use the abbreviated instructions which only required putting the following in my .bashrc:
PATH="$HOME/bin:$HOME/.local/bin:$PATH"
PATH="$PATH:/mnt/c/Program Files/Docker/Docker/resources/bin"
As an extra note:
My Windows 10 Pro has Docker and Lando setup both Natively in Windows and in WSL Ubuntu 16.04
The problem is that the particular project that I am working on has some very long directory/file names that exceed the Windows limitations. This is why I was trying to clone the repo down to the /mnt/c/myprojects direcory and work inside of WSL.
Using this process I discovered that there were some additional steps to get docker --version to work.
a. you have to create an alias for docker that maps to the full name and extension alias=docker.exe
b. you have to put your project in the /mnt/c directory to keep from getting file-system errors.
c. In the Docker for Windows Settings check the box to expose daemon on tcp without tls
When running lando start or even sudo lando start
( lando version v3.0.0-beta.22)
the errors are the same with both methods:
warn: Trying to connect to daemon...
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I then followed instructions at url: https://forums.docker.com/t/cannot-connect-to-the-docker-daemon-is-the-docker-daemon-running-on-this-host/8925/17
To do the following for Ubuntu 16.04 which is the OS version running in WSL
For Ubuntu 16.04
Inside file /lib/systemd/system/docker.service change:
ExecStart=/usr/bin/dockerd fd://
with
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375
Inside file /etc/init.d/docker change:
DOCKER_OPTS=
with
DOCKER_OPTS="-H tcp://0.0.0.0:2375"
and then restart your computer.
Tell us about your .lando.yml
→ cat .lando.yml
name: id-dev
recipe: drupal8
config:
webroot: docroot
drush: ~8.1.15
services:
appserver:
composer:
drush/drush: ~8.1.15
I don't think the other conf files are relevant but can include others if requested.
Tell us about the command you were running
lando start
Paste in a series of commands that caused the bug.
warn: Trying to connect to daemon...
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Tell us about the error you got
Rerun the command that produced your error in verbose mode. Paste in the error and the ~100 lines that proceeded it.
Example:
lando CMDTHATFAILED -- -vvvv
Error is the same in verbose mode
Tell us more
Could better documentation have prevented this issue? if so what should we change?
troubleshooting steps to setup a connection to the docker daemon?
Does this bug prevent you from using lando?
Yes
Can the installation search for a connection to Window native Docker?
Please explain your request and its importance in the form of a user story.
It seems like the install could look to see if Docker is running possibly with netstat and then setup the config to connect to that port and subnet.
Example: As a lando user who works with Drupal sites that have large databases, I want the option to exclude unnecessary database tables from being pulled when I update my site because I want faster "site pull" actions.
Please provide some detail on how lando can help solve this problem
Add programmatic steps to discover if the daemon is running and suggest how to fix the connection problem if it can not be automatically adjusted.
@GhostInTheMachines i dont think its likely we are going to change or allow customization for how lando connects to the docker daemon.
Lando is meant to be a local dev product only and we help enforce that by only connecting via a socket/named pipe instead of over tcp. This is also the recommended approach from docker re: local setup.
We recommend users in your situation either upgrade to a hyper-v ready version of Windows or spin up a complete Linux VM (eg not via WSL) that has a kernel version that supports docker.
I know this is probably not the response you were looking for but we also need to try to make sure the project is stable for most people and i think this would introduce some unneeded complexity to the project and increase our support overhead.
I also had this issue. As a workaround consider installing lando on windows then adding an alias in your shell.
alias lando='/mnt/c/Windows/System32/cmd.exe /c "lando"'
I also had this issue. As a workaround consider installing lando on windows then adding an alias in your shell.
alias lando='/mnt/c/Windows/System32/cmd.exe /c "lando"'
Sorry for noob query, but can I just add this line to my .bashrc so that it's always available?
Most helpful comment
I also had this issue. As a workaround consider installing lando on windows then adding an alias in your shell.