当前位置: 首页 > news >正文

解决dockerfile创建镜像时pip install报错的bug

项目场景:

使用docker-compose创建django容器


问题描述

 > [5/5] RUN /bin/bash -c 'source ~/.bashrc && python3 -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple':              
0.954 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple                                                                                   
15.98 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fefee58f1d0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/aliyun-python-sdk-core/                                                                                                                        
31.50 WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fefea3e8d10>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/aliyun-python-sdk-core/
47.53 WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fefea3e9710>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/aliyun-python-sdk-core/
64.55 WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fefea3e9f50>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/aliyun-python-sdk-core/
83.57 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fefea3ea8d0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/aliyun-python-sdk-core/
98.59 ERROR: Could not find a version that satisfies the requirement aliyun-python-sdk-core (from versions: none)
98.59 ERROR: No matching distribution found for aliyun-python-sdk-core
113.6 WARNING: There was an error checking the latest version of pip.

解决dockerfile创建镜像时pip install报错的bug
在这里插入图片描述


解决方案:

执行service docker restart

http://www.lryc.cn/news/183914.html

相关文章:

  • 算法题:分发饼干
  • WebSocket编程golang
  • PHP之redis 和 memache面试题
  • java socket实现代理Android App
  • Nacos与Eureka的区别
  • 浅谈Rob Pike的五条编程规范
  • LeetCode 377.组合总和IV 可解决一步爬m个台阶到n阶楼顶问题( 完全背包 + 排列数)
  • C中volatile总结
  • asp.net班级管理系统VS开发sqlserver数据库web结构c#编程Microsoft Visual Studio
  • 【Pytorch笔记】6.Transforms
  • nodejs+vue临沂特色产品销售平台elementui
  • 机器学习必修课 - 使用管道 Pipeline
  • WEB各类常用测试工具
  • Naive UI 文档地址
  • 在CentOS7系统中安装MySQL5.7
  • R语言通过接口获取网上数据平台的免费数据
  • 【Docker内容大集合】Docker从认识到实践再到底层原理大汇总
  • 算法题:摆动序列
  • 复习 --- QT服务器客户端
  • Godot 官方2D游戏笔记(1):导入动画资源和添加节点
  • leetcode 热题 100
  • Ae 效果:CC Lens
  • 【Redis】基础数据结构-quicklist
  • QT 实现服务器客户端搭建
  • Javascript - 轮播图
  • MATLAB中syms函数使用
  • 竞赛选题 深度学习 opencv python 实现中国交通标志识别_1
  • Qt 关于mouseTracking鼠标追踪和tabletTracking平板追踪的几点官方说明
  • 基于springboot的论坛网站
  • 分库分表理论总结