quart
quart copied to clipboard
Hot reload cause a permission denied error in docker container
Hot reload cause a permission denied error in docker container:
Traceback (most recent call last):
File "/app/z.py", line 9, in <module>
app.run()
File "/usr/local/lib/python3.11/site-packages/quart/app.py", line 864, in run
restart()
File "/usr/local/lib/python3.11/site-packages/quart/utils.py", line 164, in restart
os.execv(executable, [executable] + args)
PermissionError: [Errno 13] Permission denied
How to replicate the bug:
- Into a docker container
docker run --rm -it -v $PWD:/app python:3.11-alpine ash
(mount current directory) - Install
pip install quart
- Create a
app.py
, code copy from https://pgjones.gitlab.io/quart/tutorials/quickstart.html - Run
python /app/app.py
- Try to change
app.py
and you will see the error
When I try to replicate it outside of docker container, hot-reload works fine.
Environment:
- Python version: 3.11.9
- Quart version: 0.19.6