gatsbyjs / gatsby-docker

Docker image that builds and hosts a Gatsby site
MIT License
356 stars 88 forks source link

Port-mapping doesn't work #13

Closed designbyadrian closed 6 years ago

designbyadrian commented 6 years ago

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?

rc1 commented 6 years ago

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.