mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-18 17:00:25 +00:00
Use /run/docker.sock for docker, since it will work when run on a host (and can now be used in a container to access the host docker as well)
This commit is contained in:
parent
c229e8fd49
commit
c8d8ca9736
@ -9,7 +9,7 @@ Promise = require 'bluebird'
|
||||
request = Promise.promisify require 'request'
|
||||
JSONStream = require 'JSONStream'
|
||||
|
||||
docker = Promise.promisifyAll(new Docker(socketPath: '/hostrun/docker.sock'))
|
||||
docker = Promise.promisifyAll(new Docker(socketPath: '/run/docker.sock'))
|
||||
# Hack dockerode to promisify internal classes' prototypes
|
||||
Promise.promisifyAll(docker.getImage().__proto__)
|
||||
Promise.promisifyAll(docker.getContainer().__proto__)
|
||||
@ -36,7 +36,7 @@ exports.start = start = (app) ->
|
||||
options =
|
||||
method: 'POST'
|
||||
path: "/v1.8/images/create?fromImage=#{app}"
|
||||
socketPath: '/hostrun/docker.sock'
|
||||
socketPath: '/run/docker.sock'
|
||||
|
||||
req = http.request options, (res) ->
|
||||
if res.headers['content-type'] is 'application/json'
|
||||
|
Loading…
x
Reference in New Issue
Block a user