Last active
August 29, 2015 14:06
-
-
Save zimbatm/6b815e947619fe47a41a to your computer and use it in GitHub Desktop.
Forward /var/run/docker.sock to boot2docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Instead of having to set DOCKER_HOST or run `$(boot2docker shellinit)` just start this | |
# script in the background. | |
# | |
# Depends on `brew install boot2docker socat` | |
socket=`boot2docker socket 2>/dev/null | sed 's|tcp://||'` | |
exec sudo socat -d -d -ls UNIX-LISTEN:/var/run/docker.sock,fork,mode=0777 TCP4:$socket |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment