【发布时间】:2020-06-08 11:06:36
【问题描述】:
我尝试使用 pip RUN pip3 install *package* --index-url=*url* --trusted-host=*url* 构建一个 docker 映像。但是,它失败并出现以下错误:
Could not find a version that satisfies the requirement *package* (from versions: )
No matching distribution found for *package*.
但是,在我删除包并成功构建映像后,我可以成功地从 docker 容器安装包!
我用来构建镜像的 bash 是:sudo docker build --network=host -t adelai:deploy . -f bernard.Dockerfile。
【问题讨论】:
-
您想为您的项目安装所需的库吗?
-
我公司使用docker环境控制在线版本。
标签: docker pip dockerfile