我在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:
Docker-compose.yml。
version: '3.6'
services:
web:
build: .
ports:
- "5122:5122"
Requirement.txt.Cython==0.29.17Flask==0.0.1Flask-Cors==3.0.0.1
Cython==0.29.17Flask==0.0.1Flask-Cors==3.0.8boto==2.49.0boto3==1.10.7botocore==1.13.7certifi==2019.9. 11chardet==3.0.4cycler==0.10.0docutils==0.15.2gensim==3.8.1idna==2.8jmespath==0.9.4joblib==0.14.0kiwisolver==1.1. 0matplotlib==3.1.1pandas==0.25.2pyparsing==2.4.2python-dateutil==2.8.0pytz==2019.3requests==2.22.0s3transfer==0. 2.1scikit-learn==0.21.3seaborn==0.9.0six==1.12.0sklearn==0.0smart-open==1.8.4tqdm==4.37.0urllib3==1.25.6。
有谁能帮我解决这个问题,我在网站上做了R&D,但没有找到确切的解决方案。
你使用了错误的Flask版本,它应该是 Flask==1.1.1 并尝试。