mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-31 00:23:57 +00:00
Fix an issue where an image would not be cleaned up if it was tagged in multiple repos.
This commit is contained in:
parent
0931e8a16b
commit
3ad47adce4
@ -1,3 +1,4 @@
|
||||
* Fixed an issue where an image would not be cleaned up if it was tagged in multiple repos. [Page]
|
||||
* Use JOBS=MAX for npm install. [Page]
|
||||
* Updated pinejs-client so that valid ssl certificates are enforced by default. [Page]
|
||||
* Write the `registered_at` time to config.json as well, in case there is a failure between writing to config.json and writing to knex [Page]
|
||||
|
@ -11,7 +11,7 @@
|
||||
"bluebird": "^2.9.24",
|
||||
"body-parser": "^1.12.0",
|
||||
"coffee-script": "~1.9.1",
|
||||
"dockerode": "~2.1.1",
|
||||
"dockerode": "~2.2.1",
|
||||
"event-stream": "^3.0.20",
|
||||
"express": "^4.0.0",
|
||||
"knex": "~0.8.3",
|
||||
|
@ -93,11 +93,12 @@ do ->
|
||||
_.any image.RepoTags, (tag) ->
|
||||
return _.contains(appTags, tag) or _.contains(supervisorTags, tag)
|
||||
Promise.map imagesToClean, (image) ->
|
||||
docker.getImage(image.Id).removeAsync()
|
||||
.then ->
|
||||
console.log('Deleted image:', image.Id, image.RepoTags)
|
||||
.catch (err) ->
|
||||
console.log('Error deleting image:', image.Id, image.RepoTags, err)
|
||||
Promise.map image.RepoTags.concat(image.Id), (tag) ->
|
||||
docker.getImage(tag).removeAsync()
|
||||
.then ->
|
||||
console.log('Deleted image:', tag, image.Id, image.RepoTags)
|
||||
.catch (err) ->
|
||||
console.log('Error deleting image:', tag, image.Id, image.RepoTags, err)
|
||||
|
||||
containerHasExited = (id) ->
|
||||
docker.getContainer(id).inspectAsync()
|
||||
|
Loading…
x
Reference in New Issue
Block a user