mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-21 22:47:49 +00:00
On cleanup, force removal for images and containers, and remove container volumes
This commit is contained in:
parent
e0b24560b7
commit
e7acff0bcf
@ -1,3 +1,4 @@
|
||||
* On cleanup, force removal for images and containers, and remove container volumes [Pablo]
|
||||
* Add system logs for Shutdown, Reboot and Purge [Pablo]
|
||||
|
||||
# v2.3.0
|
||||
|
@ -145,7 +145,7 @@ do ->
|
||||
return true
|
||||
return containerHasExited(containerInfo.Id)
|
||||
.map (containerInfo) ->
|
||||
docker.getContainer(containerInfo.Id).removeAsync()
|
||||
docker.getContainer(containerInfo.Id).removeAsync(v: true, force: true)
|
||||
.then ->
|
||||
console.log('Deleted container:', containerInfo.Id, containerInfo.Image)
|
||||
.catch(_.noop)
|
||||
@ -155,7 +155,7 @@ do ->
|
||||
return _.contains(appTags, tag) or _.contains(supervisorTags, tag) or _.contains(locallyCreatedTags, tag)
|
||||
Promise.map imagesToClean, (image) ->
|
||||
Promise.map image.RepoTags.concat(image.Id), (tag) ->
|
||||
docker.getImage(tag).removeAsync()
|
||||
docker.getImage(tag).removeAsync(force: true)
|
||||
.then ->
|
||||
console.log('Deleted image:', tag, image.Id, image.RepoTags)
|
||||
.catch(_.noop)
|
||||
|
Loading…
Reference in New Issue
Block a user