After docker stops, rerun the container and the port binding becomes invalid

  docker, question

How do I keep the rerun container port mapping valid after docker stops? Otherwise, what about nginx or something like that?

The default is good.
If it fails, see if there are other containers or applications in use.

Dockers ps-a look at the container

Netstat Look at the Application of Host