mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-31 08:25:36 +00:00
do not override dockerfile cmd
This commit is contained in:
parent
fcc6d1375d
commit
460768d366
@ -101,7 +101,9 @@ exports.start = start = (app) ->
|
|||||||
updateDeviceInfo(status: 'Downloading')
|
updateDeviceInfo(status: 'Downloading')
|
||||||
dockerUtils.fetchImageWithProgress app.imageId, (progress) ->
|
dockerUtils.fetchImageWithProgress app.imageId, (progress) ->
|
||||||
updateDeviceInfo(download_progress: progress.percentage)
|
updateDeviceInfo(download_progress: progress.percentage)
|
||||||
.then ->
|
.then ->
|
||||||
|
docker.getImage(app.imageId).inspectAsync()
|
||||||
|
.then (imageInfo) ->
|
||||||
console.log('Creating container:', app.imageId)
|
console.log('Creating container:', app.imageId)
|
||||||
updateDeviceInfo(status: 'Starting')
|
updateDeviceInfo(status: 'Starting')
|
||||||
ports = {}
|
ports = {}
|
||||||
@ -109,9 +111,14 @@ exports.start = start = (app) ->
|
|||||||
portList.forEach (port) ->
|
portList.forEach (port) ->
|
||||||
ports[port + '/tcp'] = {}
|
ports[port + '/tcp'] = {}
|
||||||
|
|
||||||
|
if imageInfo?.Config?.Cmd
|
||||||
|
cmd = imageInfo.Config.Cmd
|
||||||
|
else
|
||||||
|
cmd = [ '/bin/bash', '-c', '/start' ]
|
||||||
|
|
||||||
docker.createContainerAsync(
|
docker.createContainerAsync(
|
||||||
Image: app.imageId
|
Image: app.imageId
|
||||||
Cmd: [ '/bin/bash', '-c', '/start' ]
|
Cmd: cmd
|
||||||
Tty: true
|
Tty: true
|
||||||
Volumes:
|
Volumes:
|
||||||
'/data': {}
|
'/data': {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user