├── Dockerfile └── README.md /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | RUN apk add --update socat bash && \ 3 | rm -rf /var/cache/apk/* 4 | 5 | VOLUME /var/run/docker.sock 6 | 7 | # docker tcp port 8 | EXPOSE 2375 9 | 10 | ENTRYPOINT ["socat", "TCP-LISTEN:2375,reuseaddr,fork","UNIX-CLIENT:/var/run/docker.sock"] 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker.sock proxy # 2 | 3 | Exposes `/var/run/docker.sock` on `tcp://docker-sock-proxy:2375` 4 | 5 | ### Usage ### 6 | 7 | ``` 8 | docker run -v /var/run/docker.sock:/var/run/docker.sock -d --restart=always --name docker-sock-proxy docksal/socat 9 | ``` 10 | 11 | Option to allow remote connections to the host (without TLS) - **USE AT YOUR OWN RISK** 12 | 13 | ``` 14 | docker run -v /var/run/docker.sock:/var/run/docker.sock -d --restart=always --privileged -p 2375:2375 --name docker-sock-proxy docksal/socat 15 | ``` 16 | This will allow external **unsecured** connections to the Docker daemon on the host on port `2375`. 17 | --------------------------------------------------------------------------------