Docker 101 : "Host" and "Bridge" networking drivers.
Docker and the "host" network:
In the "host" network setup, the container will use the IP address of the network stack of its host, so we don't have to expose any ports:
Since "nginx" listens on port 8080, we will have that port open on the host, and we can access our "nginx" container through a browser for example, using the address : "http://host_ip:8080"
Docker and the "bridge" network:
We could also verify that our container is running using the below command:
We could also see both ports in the output of the command.