mobi -v /var/Every exposed port is bound directly on a “random” port of the host machine. We will try to access nginx on host port. docker run -p 4567:4567 hello-world The -p flag sets up a port binding rule of -p host_port:container_port.
Have no fear, here is your guide to getting port forwarding working for Docker on OSX: Step 1.
Docker run port forwarding This creates a firewall rule which maps a container port to a port on the Docker host to the outside world.