Orphaned Docker mounted host volumes?

0 votes

I just inspected my /var/lib/docker/volumes folder and discovered that is bursting with folders named as Docker UUIDs each of which contain a config.json file with contents along the lines of

{"ID":"UUID","Path":"/path/to/mounted/volume","IsBindMount":true,"Writable":true}

where

/path/to/mounted/volume

is the path to the folder on the host that was mounted on to a docker container

A few containers were stopped. So these files I’m seeing in my folder are they the stopped containers or something else?

Jul 31, 2018 in DevOps & Agile by Hannah
• 14,080 points
37 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
For Docker 1.9 and up there's a native way:

List all orphaned volumes with

$ docker volume ls -qf dangling=true

Eliminate all of them with

$ docker volume rm $(docker volume ls -qf dangling=true)
answered Jul 31, 2018 by Kalgi
• 35,800 points

Related Questions In DevOps & Agile

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do I get a Docker container's IP address from the host?

Save your docker image as a tar ...READ MORE

answered Aug 29, 2018 in DevOps & Agile by shubham
• 6,500 points
29 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,120 points
57 views
+4 votes
2 answers

run docker-daemon with --iptables=false

The docker network model uses iptables to ...READ MORE

answered Aug 2, 2018 in DevOps & Agile by Kalgi
• 35,800 points
224 views
+3 votes
2 answers

How do I set max lifetime for Docker Container?

There is one more way which you ...READ MORE

answered Oct 18, 2018 in DevOps & Agile by Kalgi
• 35,800 points
204 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.