quart icon indicating copy to clipboard operation
quart copied to clipboard

Hot reload cause a permission denied error in docker container

Open cooolinx opened this issue 8 months ago • 2 comments

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:

  1. Into a docker container docker run --rm -it -v $PWD:/app python:3.11-alpine ash (mount current directory)
  2. Install pip install quart
  3. Create a app.py, code copy from https://pgjones.gitlab.io/quart/tutorials/quickstart.html
  4. Run python /app/app.py
  5. 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

cooolinx avatar Jun 20 '24 12:06 cooolinx