docker打包python项目为镜像的时候,总是会提示 Could not find a version that satisfies the requirement
下面是打包的命令
FROM python:3.7
WORKDIR ./core
ADD . .
RUN pip install -r ./cigarette_pack_counting_model/requirements.txt -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com
CMD ["python", "./cigarette_pack_counting_model/app.py"]
编译的报错也看看呢,你可以试下把CMD这行去掉估计就好了,公司的电脑没有环境帮你测试,建议cmd可以放到docker run 或者docker-compose的yaml文件里面启动,如果很急的话你可以找我,咱们一起调试看看