Docker Community Forums

Share and learn in the Docker community.

How to access Docker TCP Socket?

(zepouet) #1

Expected behavior

To have a TCP socket to have the same behaviour that in Linux

Actual behavior

No TCP socket present.
lsof -i tcp | grep docker returns nothing.

Do you foresee to do it ? Else can we mount from a java program the Unix Socket to call the Docker API ?

Thanks a lot. Best regards


OS X: version 10.11.2 (build: 15C50) version v1.10.3-beta5
Running diagnostic tests:
[OK]      docker-cli
[OK]      Moby booted
[OK]      driver.amd64-linux
[OK]      vmnetd
[OK]      lofs
[OK]      osxfs
[OK]      db
[OK]      slirp
[OK]      menubar
[OK]      environment
[OK]      Docker
[OK]      VT-x

(Gleclaire) #2

lsof -i tcp | grep dock

(Justin Cormack) #3

We do not have any current plans to support a tcp interface on the host (there is a temporary one on the VM but that will be going away soon). You can just use something like netcat to act as a proxy, or a Java Unix socket package.

(Shuanglei Tao) #4

I’m using socat TCP-LISTEN:2376,reuseaddr,fork UNIX-CLIENT:/var/run/docker.sock to proxy tcp connection to docker unix sock, it works fine.

(Dave Tucker) #5

As mentioned in Using pycharm docker plugin with docker beta this workaround is not recommended.