docker-examples icon indicating copy to clipboard operation
docker-examples copied to clipboard

Top level README example for localhost server opens firewall hole, listens to connections from the internet

Open erno opened this issue 4 years ago • 0 comments

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.

erno avatar Jan 18 '21 14:01 erno