Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port-mapping doesn't work #13

Closed
designbyadrian opened this issue Feb 20, 2018 · 1 comment
Closed

Port-mapping doesn't work #13

designbyadrian opened this issue Feb 20, 2018 · 1 comment

Comments

@designbyadrian
Copy link

designbyadrian commented Feb 20, 2018

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
Copy link

rc1 commented Mar 28, 2018

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.

cusspvz added a commit that referenced this issue Apr 3, 2018
@cusspvz cusspvz closed this as completed Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants