What is the relationship between the port and IP address specified by the program in the docker container and the host machine?

I pull an image of hadoop, and I install jupyter, in it. I used to do data analysis, so I"m used to using this tool. Now I want to learn about spark, in docker and plan to log on to jupyter on the host machine using a browser. But no matter how I specify the IP and port with the command, it cannot be opened on the host machine. I don"t quite understand the relationship between ports. Is there any mapping relationship? What kind of operation do I need to do? Thank you for your help!

Feb.27,2021
Menu