Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is docker volume deleted if the container is deleted?

I’m reading the book The docker book version v1.2.0, in chapter 6 in page 178 it said that

if you deleted the last container that uses a volume, the volume will disappear. Be carful about deleting containers that might hold volumes with data you need

But when I tried it, the volume isn’t deleted.
Is that just because I’m reading old version ??

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

The newer versions will not delete your volume, unless you’re using the parameter --volumes or -v.

https://docs.docker.com/engine/reference/commandline/rm/#options

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading