I have created an app, which uses Docker to create containers. The app takes about 20-30 minutes to build the first time and then it is very quick thereafter.
On my MAC; containers are kept until they are deleted by me. However, on my Windows PC; the containers are automatically deleted every time I close Visual Studio 2017. Therefore I have to sit and wait for my solution to build each time I open the solution fresh on my Windows PC.
Is there a way to stop Docker deleting containers every time Visual Studio is closed on my Windows PC?
So far I have looked for a setting inside Docker desktop and inside Visual Studio/Options, however I cannot find it. I have also Googled this.
In Visual Studio 2019, under Tools->Options search for Docker Compose and then set the Remove containers on project close option to False. Click OK and you should be good.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With