Docker network port mapping, there is no convenient operation method?

  docker, question

After installing the new software in the container, must you commit and then run to add the port? this is going to be too much trouble: (

If used in run-pIf mapping ports is still troublesome, it can be written in Dockerfile