-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.