Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker unix socket not available in boot2docker, use tcp instead #94

Open
brainstorm opened this issue Oct 19, 2015 · 2 comments
Open

Comments

@brainstorm
Copy link

Hello @crosbymichael,

In the documentation you mention the following commandline:

docker pull crosbymichael/skydock
docker run -d -v /var/run/docker.sock:/docker.sock --name skydock crosbymichael/skydock -ttl 30 -environment dev -s /docker.sock -domain docker -name skydns

And then, there's an assumption on using unix sockets instead of tcp ones:

"""
(...) I'm guessing for most, you do not want to service the docker API on a tcp port for containers to reach. If we bind the unix socket into this container we don't have to worry about other containers accessing the API, only skydock.
"""

The default for OSX machines running things like boot2docker is to run the local docker client pointing to a Virtualbox VM that runs docker inside (since OSX's kernel does not support Docker natively... (yet or ever?)):

$ docker-machine ls
NAME   ACTIVE   DRIVER       STATE     URL                         SWARM
dev    *        virtualbox   Running   tcp://192.168.99.102:2376

I've been trying to run the container without specifying unix sockets, but apparently it is a requirement when running the service?:

$ docker run -a STDERR --name skydock crosbymichael/skydock -ttl 30 -environment dev -domain arvados -name skydock
[info] 1445275257 skydock: loading plugins from /plugins/default.js
[fatal] 1445275257 skydock: error retrieving skydns container 'skydock': dial unix /var/run/docker.sock: no such file or directory
dial unix /var/run/docker.sock: no such file or directory

How can I run skydock when docker-machine and the OSX setup in general relies on TCP ports instead of sockets?

@brainstorm
Copy link
Author

Trying to reverse the order of the docker volume mapping the unix socket and passing a SkyDNS url does not help but gets me a bit further:

$ docker run -a STDERR -v docker.sock:/var/run/docker.sock crosbymichael/skydock -ttl 30 -environment dev -domain arvados --skydns http://dev.arvados -s /var/run/docker.sock
[info] 1445329158 skydock: loading plugins from /plugins/default.js
[info] 1445329158 skydock: skydns URL: http://dev.arvados
[debug] 1445329158 skydock: starting restore of containers
[fatal] 1445329158 skydock: error restoring containers: dial unix /var/run/docker.sock: connection refused

@brainstorm
Copy link
Author

For the record, if someone wants to try/reproduce these issues I'm having with skydock with a specific application:

https://github.com/curoverse/arvados-dev/blob/master/install/easy-docker-install.sh

Last things I tried before I found this issue in arvdock:

https://github.com/brainstorm/arvados/commit/8f4ac0ea0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant