docker-examples
docker-examples copied to clipboard
Top level README example for localhost server opens firewall hole, listens to connections from the internet
There's "running an Nginx webserver on localhost" followed by this command line: docker run -d -p 80:80 --name webserver nginx
But in reality, you need to use docker run -p 127.0.0.1:nnnn:nnnn to use localhost. And Docker will go out of its way to even make a firewall rule to allow traffic to the given incoming port from the internet.