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

后端 未结 2 2104
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-15 22:22

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:08

    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

提交回复
热议问题