How to have docker without docker desktop so that I have 2 containers service [django and nginx] which share a network and also in the host [wsl2 Ubuntu] mysql is installed.
How to connect django and mysql, django and nginx?
Also, I moved your topic to the General category, as the Community category is use when you want to announce a community event or ask about a community event - Your post is none of those.
Back in the day before WSLg was available, I used the mentioned approach to render x-applications from WSL2 on a x-server running on the windows host. As in: I accessed a service on the host from the wsl2 distro like this. If it’s not working for you, then it is high likely either a firewall or routing problem.
There is a reason why Docker Desktop exists. It is not “just” a WSL2 distro. It provides plenty of convenient functionality like adding a dns entry (!) to resolve host.docker.internalto the host.
Anyway, the origin of the problem is not related to docker. You just happen to experience it with docker container, but you would also experience it, if you run a native process on wsl2 without docker.
From my perspective this topic belongs into a WSL forum, not in a Docker forum.
Make sure docker desktop is fully uninstalled
Also unistall docker in wsl [Ubuntu]
Restart the pc, shutdown wont work
Install docker and use 172.17.0.1 instead of host.docker.internal
Thank you
So mysql is not running on Windows, but instead it running inside the WSL distribution that runs docker-ce?
Since you are able to access mysqd using the ip of the docker0 interface, mysqld must be running inside the wsl distro and listen on 0.0.0.0:3306, and not on the host. In this case of course, it is not a WSL related topic, and clearly is a docker related topic.