mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-21 02:01:35 +00:00
ApplicationManager: only use dockerImageId to identify images for current apps, to avoid trying to delete an image that is in use
Change-Type: patch Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
parent
bc153ffe5d
commit
b6631b7367
@ -892,7 +892,7 @@ module.exports = class ApplicationManager extends EventEmitter
|
||||
allImagesForTargetApp = (app) -> _.map(app.services, imageForService)
|
||||
allImagesForCurrentApp = (app) ->
|
||||
_.map app.services, (service) ->
|
||||
_.omit(_.find(available, { dockerImageId: service.image, imageId: service.imageId }), [ 'dockerImageId', 'id' ])
|
||||
_.omit(_.find(available, { dockerImageId: service.image }), [ 'dockerImageId', 'id' ])
|
||||
availableWithoutIds = _.map(available, (image) -> _.omit(image, [ 'dockerImageId', 'id' ]))
|
||||
currentImages = _.flatMap(current.local.apps, allImagesForCurrentApp)
|
||||
targetImages = _.flatMap(target.local.apps, allImagesForTargetApp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user