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
[RFC] Dockerize #216
[RFC] Dockerize #216
Conversation
I think this is pretty cool. The number of workers should be configurable via an env variable. Would we also add this to the docker hub registry? What account should it be under? I've seen some projects manage the dockerfile in a separate repository (docker-httpbin) instead of keeping the dockerfile in the main repository. I don't think there is a convention for this yet.
|
Cool, I'll make that change and push it up.
I think it would be worth doing. As for what account, I have no particular opinion on that front. =) |
Ok, number of workers can now be configured by setting GUNICORN_WORKERS to the appropriate value: the default is currently 4. |
OK, this reminded me of a tool that I've been experimenting with lately for work and I've open-sourced it but not yet put it on PyPI because it's still in flux. https://github.com/msabramo/pydockerize The idea is to make it as easy as possible to take a Python app and make a Docker image for it and run it. It tries to glean as much information as it can from Comments are appreciated. Pull requests are appreciated ecstatically! |
So I'm kind of torn personally @kevin1024 about where to keep the I guess I'm +0.5 on having it here, but if the consensus ever does become that it should be in a separate repo, I'm okay with that too. Thanks for this @Lukasa ! |
I think it makes sense to keep the I'd say create an organization on Docker hub for |
@msabramo Agreed, though it would be equally good to have |
This is what I was getting at without verbalizing it. :D I would think @Runscope/owners might want this under a |
Damnit @Lukasa you always comment 10s before me with exactly what I was thinking. |
Yeah, |
FYI, this Dockerfile is currently running behind H2O on http2bin.org. |
What is H2O? (Other than water) |
It's a HTTP/1.1 and HTTP/2 reverse proxy. See here. |
The relevant Dockerfile for that one is here. |
OK, makes sense. +1 from me for keeping it in the repo. Regarding the base image: I've been using the official Docker python language stack and it works pretty well. It makes some assumptions about the layout of the project will automatically run |
I also used the official python image and it was cool. IIRC only the "onbuild" tagged versions have the ONBUILD that does |
Oh and +1 for Dockerfile in repo and runscope/httpbin docker hub image. |
can we do this on alpine? |
also, gunicorn will automatically honor |
can always improve it later |
[RFC] Dockerize
[RFC] Dockerize
For ease of deployment it might be helpful to have a Docker container that runs httpbin. This is a simple first step down that road.
Before merging, it might be worth trying to optimise this image somewhat. For example, it might be better to use Debian as the base rather than Ubuntu. It might also be worth trying to remove the artifacts of the build step, make the number of gunicorn workers parameterizable, or something else interesting. I'm happy to make those changes and test them.