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

Can't reach server running inside Docker container #68

Closed
ggalmazor opened this issue Sep 10, 2018 · 5 comments
Closed

Can't reach server running inside Docker container #68

ggalmazor opened this issue Sep 10, 2018 · 5 comments

Comments

@ggalmazor
Copy link

Hi! I'm wrapping my sphinx dev environment inside a Docker container to make it portable and easier to use for other users and I'm interested on adding sphinx-autobuild into it.

Up to now, I was able to run a python -m http.server inside the container and access it from my host machine, no problem.

I've made some tries with sphinx-autobuild and the building part works great but I can't access the web server, even though I've EXPOSEd the port I'm using in my Dockerfile and I'm binding a host port to it, as with the http.server module.

It seems that the server the sphinx-autobuild module is starting isn't getting my hosts requests.

Any idea on how to run it on debug mode, or have some logs to look further into this issue?

@iicky
Copy link

iicky commented Jan 29, 2019

@ggalmazor

I ran into this same issue - the trick for me was to change the host from 127.0.0.1 to 0.0.0.0. Here is my CMD in my Dockerfile (I am running on port 8181):

CMD ["sphinx-autobuild", "--host", "0.0.0.0", "--port", "8181", "docs/source", "docs/build"]

@ggalmazor
Copy link
Author

Thanks, @iicky!

Honestly, I had solved the issue somehow. I'll review what I did and leave feedback here :)
(might as well be just what you've commented)

@iicky
Copy link

iicky commented Jan 29, 2019

@ggalmazor Awesome, keep me posted - definitely excited about having this tool!

@ggalmazor
Copy link
Author

@iicky

Yup, it was --host 0.0.0.0 what I did.

I also had to add --poll because automatic change detection doesn't work well on Windows, but it didn't affect our Linux and macOS users.

@ggalmazor
Copy link
Author

I guess we can close the issue now :)

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

2 participants