-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker issues on WSL when Docker Desktop integration is disabled #181
Comments
@AaronFeledy my take on this, FWIW, is that it's probably not great to force on a setting a user has purposefully disabled. I feel like it would be best to improve lando so that the usual linux docker setup runs in WSL2 when the integration is disabled? |
@pirog Yeah, picking the best default behavior gets tricky: If they have Docker Desktop installed, they probably are already using it and want to continue using it. It's what's recommended by Docker and should probably also be our recommendation. It's easy to get into a situation where the integration was never enabled for your WSL instance, even if you want it (or don't know you want it) such as when creating a WSL instance that is not marked as the default. (DD only enables integration for the default WSL instance). I've had issues where I've had docker installed inside a WSL instance and then later indirectly enabled DD integration by telling WSL to start considering it my default instance. Then you get inconsistent behavior because starting Docker Desktop will symlink the integration bins into your WSL instance only while Docker Desktop is started. If you haven't started Docker Desktop yet that day or it crashes, the docker you installed inside the instance gets used instead. My concern is that if a user doesn't know the how/what/why of the integration, we may unintentionally create problems for them. If the user is actually trying to keep things separate (often mistakenly thinking there's a performance benefit) and has deliberately chosen to disable the integration, then we could install docker. I don't think we can automatically determine their intent though. I think this is an advanced use case and there are WSL-specific ways to disable interoperability if their goal is to actually keep things separated. In which case, Lando setup won't see Docker Desktop and will just install it as expected. Perhaps we can recommend the Docker Desktop integration approach but also add a flag to the lando setup command that allows them to signal their intent and force the docker install. |
Do I have this issue?
docker version
in your WSL session shows a message telling you to enable WSL integration in Docker Desktop, then you have this issue.What's the workaround?
The problem
$PATH
to allow executing a Windows exe from the WSL CLI.docker.exe
. This is not thedocker
binary that is capable of executing commands. Instead it just echos a message telling you to enable Docker Desktop integration.which docker
andwhich docker-compose
?) duringlando setup
, so it skips installing it.systemd
andinitd
methods of starting services wheresystemd
is not enabled on Debian-based WSL instances such as the Ubuntu default.Repro
lando setup
lando setup
does not attempt to install docker and also fails to add the user to the "docker" groupSuggested Fix
lando setup
so that it doesn't report that Docker is already installed in this scenario.lando setup
because Docker recommends using Docker Desktop WSL integration vs installing docker directly.The text was updated successfully, but these errors were encountered: