subuser-security / subuser

Run programs on linux with selectively restricted permissions.
http://subuser.org
GNU Lesser General Public License v3.0
890 stars 65 forks source link

OSX support: Error: Docker is not running. #276

Closed jcrben closed 7 years ago

jcrben commented 8 years ago

I noticed on the ycombinator thread that you said you hadn't tried it on OSX.

I get the following message when I run subuser subuser add vim vim@default:

Installing libdebian ...
Error: Docker is not running.  You can launch it as root with:

# docker -d

I think the problem is that there's no docker daemon in OSX. I had a docker-machine virtualbox environment running when I executed this command.

The code triggering the message is here. Sorry I can't offer a pull request - I'm not sure how to fix it.

timthelion commented 8 years ago

https://github.com/subuser-security/subuser/issues/121

timthelion commented 8 years ago

I'm not sure what the status is on running Docker in VMs. Back when it was called boot2docker, it wasn't possible to use shared volumes, but I presume this has been fixed by now.

The current problem that you are running into is that you don't have access to the docker unix socket. Fixing that should be pretty easy. As it should involve only adding an if statement here and here. However, there is another problem. I'm not sure if it is possible to share unix sockets between VMs and OSX, and the XPRA bridge uses a unix socket to communicate... While xpra of course also supports UDP sockets and many other protocols, all of these protocols are NETWORK protocols, and it is currently impossible to use network protocols to connect to the xpra server if the xpra server has networking disabled (which it does for security reasons). In order to get around this, there needs to be some IPTABLES magic at the virtual machine level. I'm not %100 sure how to deal with that, but it may be best to wait untill subuser calls runc directly, because then subuser will handle the networking itself, and I think things may become clearer then.

timthelion commented 7 years ago

Closing as dup.