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
Hot reloading doesn't work inside Docker container #142
Comments
Hi @nleroy917, sorry you're having trouble.
There wasn't, so I added these in #143. With this minimal example, live reloading works as expected for me. Could you try to reproduce with that example and work backwards to your current setup? I suspect the issue might be that you're mounting a single file as a volume, rather than a directory.
You also shouldn't need to set these. Also, PS: using alpine images for Python is generally not recommended: https://pythonspeed.com/articles/alpine-docker-python/ |
Hey @di! Thanks for the detailed example. I swapped out the alpine image for slim and that didn't work, but when I changed my volume mounts to: volumes:
- .:/server hot reloading started working again. I've used flask inside Anyways, thank you for the help! |
Yeah, I think ultimately it's this issue: moby/moby#15793. Glad to help! |
I've having issues getting the live reloading to work when running the
functions-framework
inside a Docker container. I'm trying to set up a development environment usingdocker-compose
. I am using the solution implemented here to be able to call all functions from one endpoint.This is my
Dockerfile
:And inside
docker-compose.yml
I have this:I specified
main.py
as a mounted volume so it can see changes made during deployment, but nothing I do to that file triggers a hot reload. I wasn't sure if there were any examples running this in a docker container for development.Thanks!
The text was updated successfully, but these errors were encountered: