Docker: Container running in a certain port?

Viewed 934

Is there a way to use docker ps for a certain port. I am assuming at any given time there would be only one container running on a certain port.

What if I want to get the output of docker ps on a particular port number say 1433?

2 Answers

If you want to see the port that is mapped to into the container, you can try:

docker ps --filter "expose=80"

According to the docs there is no supported built-in filter by port, so you will have to filter the output using grep (or findstr if you are on a Windows machine)

Related