Skip to content

Instantly share code, notes, and snippets.

@zimbatm
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zimbatm/6b815e947619fe47a41a to your computer and use it in GitHub Desktop.
Save zimbatm/6b815e947619fe47a41a to your computer and use it in GitHub Desktop.
Forward /var/run/docker.sock to boot2docker
#!/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