Docker run-p2x1: xx2 specifies the port mapping. after entering the container, can you start the network program inside?

  docker, question

-p is followed by a network program, which is not very flexible.
Can ps -p open many network ports at the same time?

It can be, but don’t do it. If you have multiple programs, you should open multiple containers. This is the correct posture for docker.

Docker-compose is recommended.