簡體   English   中英

container_linux.go:349: 啟動容器進程導致 exec: flask: 在 $PATH 中找不到可執行文件

[英]container_linux.go:349: starting container process caused exec: flask: executable file not found in $PATH

我在 docker 中遇到錯誤:

$ docker-compose -f docker-compose.yml up -d
Removing policyclassification_web_1
Recreating 9c6607f3968d_policyclassification_web_1 ... error

ERROR: for 9c6607f3968d_policyclassification_web_1  Cannot start service web: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"flask\": executable file not found in $PATH": unknown

ERROR: for web  Cannot start service web: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"flask\": executable file not found in $PATH": unknown
Encountered errors while bringing up the project.

我的 dockerfile:

Dockerfile

Docker-compose.yml:

version: '3.6'
services:
  web:
    build: .
    ports:
      - "5122:5122"

需求.txt:

Cython==0.29.17 Flask==0.0.1 Flask-Cors==3.0.8 boto==2.49.0 boto3==1.10.7 botocore==1.13.7 certifi==2019.9.11 chardet==3.0.4 cycler==0.10.0 docutils==0.15.2 gensim==3.8.1 idna==2.8 jmespath==0.9.4 joblib==0.14.0 kiwisolver==1.1.0 matplotlib==3.1.1 pandas==0.25 .2 pyparsing==2.4.2 python-dateutil==2.8.0 pytz==2019.3 requests==2.22.0 s3transfer==0.2.1 scikit-learn==0.21.3 seaborn==0.9.0 六==1.12 .0 sklearn==0.0 smart-open==1.8.4 tqdm==4.37.0 urllib3==1.25.6

誰能幫我解決這個問題,我在網站上進行了研發,但沒有找到確切的解決方案。

您使用了錯誤的 Flask 版本,它應該是Flask==1.1.1並嘗試。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM