'Prevent Docker Desktop on Windows 10 from restarting containers on startup?

Every time I restart my computer, then try to docker-compose up in WSL, it fails because ports are in use. However, sudo lsof -i -P -n | grep LISTEN doesn't show any conflicting ports in use.

I noticed that in Docker Desktop, my containers are running. However, docker ps shows no containers running. I could still curl my containers, so they're definitely running.

It seems like after restarting my computer, Docker Desktop automatically restarts containers in Windows (as opposed to WSL), so docker ps in WSL can't find the containers. How can I prevent Docker Desktop from doing this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source