Whenever I log out of my Windows 10 (Pro) user session, or restart or shutdown, logging back in will auto-start Docker Desktop (per my intentional setting), but will not start any of my containers.
The issue is that I’ve sometimes opened my code editor before realizing the container its related project files are on isn’t running… since sometimes the computer will auto-restart per Windows update or company management without me being aware beforehand. If I’m not careful, then my editor project settings are wiped again.
I’ve been trying to figure out how to auto-start this one container that has the files my editor links to for its project settings, but I’m not seeing how to do this when my container is inside of WSL 2 (Ubuntu2004 parent image). I can see how to set auto-restart from a command, but I’m kind of new to Docker and Docker Desktop and WSL 2.
What should I do? I’m not sure how to implement any sort of CLI docker commands to attach an auto-restart to the container, and I’m not seeing any settings in Docker Desktop or WSL 2 for this. There may be something in Docker Desktop > gear settings icon > Docker Engine or Experimental Features or Kubernetes, but I’m wary of trying things out myself there, and not understanding a lot of the documentation specifics for these (new terminology and context etc). Thanks for any advice.