Docker- 部署过程中出现的异常及解决方案

1. 在生成镜像时,安装指定python包时报错

> RUN pip install -i https://doubanio.com/simple/ -r requirement.txt
ERROR: Could not install packages due to an EnvironmentError: [Errno 39] Directory not empty: '/usr/local/python3/lib/python3.6/site-packages/certifi-2018.11.29.dist-info/'

解决方案
发现还是权限问题,故需加入参数--user解决
RUN pip install --user -i https://doubanio.com/simple/ -r requirement.txt

posted @ 2020-08-20 21:49  Alive_2020  阅读(1072)  评论(0编辑  收藏  举报