Until now, with the method that you learned, the containers always get bound to all the IP addresses configured on the Docker host. However, you may want to offer different services on different IP addresses. In other words, a specific IP address and port would be configured to offer a particular service. We can achieve this in Docker using the -p <ip>:<hostPort>:<containerPort> option of the docker run subcommand, as shown in the following example:
$ sudo docker run -d -p 198.51.100.73:80:80 apache292f107537bebd48e8917ea4f4788bf3f57064c8c996fc23ea0fd8ea49b4f3335
Here, the IP address must be a valid IP address on the Docker host. If the specified IP address is not a valid IP address on the Docker ...