Sharing a unix socket between a Docker container and it's host
FROM ubuntu
RUN apt-get update
RUN apt-get install -y socat
VOLUME /foo
CMD socat UNIX-LISTEN:/foo/bar.sock -
docker build --rm -t cberg-test .
/root/foo
:docker run --rm -v /root/foo:/foo cberg-test
/root/foo
by the container):echo 'hello docker' | socat - UNIX-CONNECT:/root/foo/bar.sock
hello docker