I have a docker container running on RHEL 7 with Docker 1.7.0. The program which running in this container listens for TCP connections on port 5000. In my Dockerfile I put t
You can either do:
docker exec netstat -tan | grep ESTABLISHED
or if you don't have netstat in your docker image:
docker inspect -f '{{.State.Pid}}' # note the PID sudo nsenter -t -n netstat | grep ESTABLISHED
nsenter is part of util-linux package. (plagiarized @larsks)