Reputation: 9816
I find that if running docker run -d -v /HOST/PATH:/CONTAINER/PATH IMAGE
to mount data volumes, the data still remains on the host after deleting the container.
Is it designed to do so? Is there a way to automatically remove container data from the host when deleting the container?
Upvotes: 0
Views: 235
Reputation: 11595
Data volumes are designed to persist data, independent of the container’s lifecycle.
If you don't want the data to persist on the host, don't use volumes.
Upvotes: 1