How does docker specify the ip address of the container?

  docker, question

By default, my network card has a docker0 with an ip of 172.17.42.1. I think the fixed ip allocated by the container is 172.17.0.155

Isn’t it?sudo docker run -p 172.17.0.155:80 <imageID>?
I don’t know whether you want to change the port that the container maps to the outside to this ip or whether you want to run the contents of the container on this ip inside.