#You can use docker inspect <container id>. #For example: CID=$(docker run -d -p 4321 base nc -lk 4321); docker inspect $CID