“OSError: [Errno 8] Exec format error” when trying to run simple flask app in a docker container

后端 未结 2 564
遇见更好的自我
遇见更好的自我 2021-02-15 22:26

I\'m trying to start a simple Flask \"Hello world\" app in a docker container but I keep getting this error: \"OSError: [Errno 8] Exec format error: \'/app/app.py\'\"

My

2条回答
  •  庸人自扰
    2021-02-15 23:09

    I hit the same problem (Exec format error, then FileNotFound if I added the shebang).

    Adding "RUN chmod 644 app.py" to the Dockerfile fixed it for me, as mentioned here: https://github.com/pallets/werkzeug/issues/1482

提交回复
热议问题