mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-24 07:46:41 +00:00
Merge pull request #307 from resin-io/fix-getimageenv
Fix docker utils getImageEnv by correctly parsing the returned array
This commit is contained in:
commit
2331cc7d70
@ -1,3 +1,4 @@
|
||||
* Fix docker utils getImageEnv by correctly parsing the returned array [Pablo]
|
||||
* Avoid installing npm dependencies twice [Pablo]
|
||||
* Updated to bluebird 3 [Page]
|
||||
* Better parameter handling in PUT /v1/devices/:uuid [Pablo]
|
||||
|
@ -384,6 +384,12 @@ do ->
|
||||
exports.getImageEnv = (id) ->
|
||||
docker.getImage(id).inspectAsync()
|
||||
.get('Config').get('Env')
|
||||
.then (env) ->
|
||||
# env is an array of strings that say 'key=value'
|
||||
_(env)
|
||||
.invokeMap('split', '=')
|
||||
.fromPairs()
|
||||
.value()
|
||||
.catch (err) ->
|
||||
console.log('Error getting env from image', err, err.stack)
|
||||
return {}
|
||||
|
Loading…
Reference in New Issue
Block a user