Closed designbyadrian closed 6 years ago
Running this command:
docker run -d --rm myproject/website . exposes no site on localhost...
docker run -d --rm myproject/website .
but
docker run -d -p 80:80 --rm myproject/website . does.
docker run -d -p 80:80 --rm myproject/website .
Am I just being clueless about how Docker works?
That's how docker works. Docker won't publish a container's port(s) to the host unless you explicitly say so with the -p parameter.
-p
Running this command:
docker run -d --rm myproject/website .
exposes no site on localhost...but
docker run -d -p 80:80 --rm myproject/website .
does.Am I just being clueless about how Docker works?