Skip to content

Hot reload cause a permission denied error in docker container #350

Description

@cooolinx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions