I don't have a clear image of how Docker behaves on Mac, but I had wasted a whole day trying to make it work on Windows WSL.
I'd suggest you virtualize a normal Linux host on your machine (under VMware for example) and run Docker there.
I'd suggest you virtualize a normal Linux host on your machine (under VMware for example) and run Docker there.
The reason it doesn't work on WSL1 is because of the whole Linux kernel not being there, the features required for Docker to work don't exist. But since WSL2 is a (rather performant for certain tasks) VM, it works fine.
[1] https://nickjanetakis.com/blog/setting-up-docker-for-windows...
The problems started when I docker-compose up'd a pretty basic nginx-php-mariadb stack.