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:
Page 2014-04-03 15:02:14 +01:00 committed by Pablo Carranza Vélez
parent c229e8fd49
commit c8d8ca9736

View File

@ -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'