docker-archive / for-aws

92 stars 26 forks source link

Will EBS/EFS Volumes Get Pruned #89

Closed RehanSaeed closed 7 years ago

RehanSaeed commented 7 years ago

Will EBS/EFS volumes get pruned if I enabled the option to prune unused containers/images/volumes and my container gets stopped for some reason? This is a nice feature but not for volumes which contain important data. Images are backed up in a registry so pruning them is fine but volumes is more transient.

ddebroy commented 7 years ago

@RehanSaeed the prune option in the template maps to docker system prune -a. The system prune only operates on volumes backed by the local driver. So EBS/EFS volumes backed by Cloudstor won't be affected by the system prune even if they are not in an attached/mounted state.

https://github.com/moby/moby/blob/8af4db6f002ac907b6ef8610b237879dfcaa5b7a/daemon/prune.go#L155