Can't access Consul in wsl2 using docker-compose


I use wsl2 for development and I’m studying consul and nomad.

But I can’t manage to get Consul working in wsl2 with docker-compose.

Even using docker example on the docker hub page.

I’m not able to connect to consul.

I tried to find examples on the web, but it seems that nobody are studying consul with wsl, or I’m not good in searching things on google.

If someone can point me to some material I will appreciate a lot.


If anyone in the future have the same problem.

I solved using Canonical multipass.