I’m running Docker Desktop version 3.3.0 on Windows 10 Enterprise 20H2. I have the same problem with both the WSL 2 and the Hyper-V backend: I can run a docker stack, but when I logout of Windows, Docker Desktop stops (“Linux Containers WSL 2 backend is stopping” is the notification), and so does my stack.
I’ve run into the same problem, and can’t seem to find a resolution. I’ve been trying to serve a simple ‘hello world’ page with the httpd image, using WSL2 with Debian installed as the default distro. Page loads just fine, but as soon as I log out of Windows, no more requests are served. It seems like a serious problem that logging out of Windows would take down a container you are using as a web server…why can’t I find anything documenting this?
Docker Desktop for Windows is meant for development, not for a production web server. If you must use Windows for production you may want to look at ‘Mirantis Container Runtime’ (so, not offered by Docker). But for what Mirantis told me in December 2020, that does not run Linux containers.