makeusabrew / decking

A Docker helper to create, manage and run clusters of containers
http://decking.io
443 stars 36 forks source link

'destroy' removes mounted data-containers #86

Closed hrbu closed 9 years ago

hrbu commented 9 years ago

When calling destroy <cluster>, decking removes the data-containers that are defined as a "mount-from" dependency.

"base.coredatastore": {
    "image": "coredatastore:1.0-SNAPSHOT",
    "port": ["5984:5984"],
    "mount-from": ["base.coredatastore_volume"]
},
"base.coredatastore_volume": {
    "image": "coredatastore_volume:1.0-SNAPSHOT",
    "data": true
}

... means, in case of destroy my data-container base.coredatastore_volume will be destroyed too.

When calling destroy I'd prefer to

What do you think?

makeusabrew commented 9 years ago

I agree. I actually noted this down somewhere (found it: #58) but then forgot to implement it that way. Data container destruction should be opt-in only. Will get it in to 0.5.0 :)

makeusabrew commented 9 years ago

Fixed as of 0.5.0; can pass in --include-data to decking destroy to remove data volumes. Other options are --include-persistent (to delete any containers with a persistent: true setting) and --include-volumes :)