Docker:在centos映像上安装库
我是Docker的新手。我创建了以下Dockerfile并运行了它: 来自centos:最新 环境集装箱装卸工 运行yum-y update&&yum全部清除 我收到以下错误/输出: root@GGNLABVM-JUPER6:~/docker#u test#docker build-t test 正在将生成上下文发送到Docker守护程序2.048 kB 步骤1/3:从centos开始:最新 --->A8493F50FF 步骤2/3:环境集装箱装卸工 --->在e8e244c0c9d6中运行 --->07355d554b3a 拆卸中间容器e8e244c0c9d6 步骤3/3:运行yum-y更新和yum全部清除 --->在68ad7f2f86e2中运行 加载的插件:FastTestMirror、ovl 其中一个配置的存储库失败(未知), 而且yum没有足够的缓存数据继续。此时,百胜唯一安全的方法就是失败。有几种方法可以“修复”此问题:Docker:在centos映像上安装库,docker,centos,libraries,Docker,Centos,Libraries,我是Docker的新手。我创建了以下Dockerfile并运行了它: 来自centos:最新 环境集装箱装卸工 运行yum-y update&&yum全部清除 我收到以下错误/输出: root@GGNLABVM-JUPER6:~/docker#u test#docker build-t test 正在将生成上下文发送到Docker守护程序2.048 kB 步骤1/3:从centos开始:最新 --->A8493F50FF 步骤2/3:环境集装箱装卸工 --->在e8e244c0c9d6中运行 -
1。联系上游的存储库,让他们解决问题。
2.为存储库重新配置baseurl/etc,以指向正在工作的上游。如果您使用的是较新的
存储库(以及
上一个发行版的包仍然有效)。
3.在暂时禁用存储库的情况下运行该命令
yum--disablerepo=。。。
4.永久禁用存储库,因此默认情况下,yum不会使用它。好吃
然后将忽略存储库,直到您永久启用它
再次或使用--enablerepo临时使用:
yum配置管理器--禁用
或
订阅管理器repos--禁用=
5.如果失败的存储库不可用,请将其配置为跳过。
请注意,yum将尝试联系repo。当它运行大多数命令时,
所以每次都要尝试失败(因此.yum会慢得多)。如果这是一个非常暂时的问题,这通常是一个很好的解决方案
妥协:
yum config manager--save--setopt=.skip_if_unavailable=true
找不到repo:base/7/x86\u 64的有效baseurl
如何解决此问题
仅供参考:我想为我的应用程序安装其他依赖python的库
码头工人信息:
货柜:25
跑步:3
暂停:0
截止时间:22
图片:13
服务器版本:17.03.1-ce
存储驱动程序:aufs
根目录:/var/lib/docker/aufs
备份文件系统:extfs
目录:78
支持的Dirperm1:true
日志驱动程序:json文件
Cgroup驱动程序:cgroupfs
插件:
卷:本地
网络:网桥主机macvlan空覆盖
蜂群:不活跃
运行时:runc
默认运行时:runc
初始化二进制文件:docker Init
集装箱版本:4ab9917febca54791c5f071a9d1f404867857fcc
runc版本:54296cf40ad8143b62dbcaa1d90e520a2136ddfe
初始版本:949e6fa
安全选项:
应用程序访问控制系统
赛康普
配置文件:默认值
内核版本:4.4.0-72-generic
操作系统:Ubuntu 16.04.1 LTS
OSType:linux
架构:x86_64
中央处理器:1
总内存:3.859 GiB
名称:GGNLABVM-JUPER6
ID:KXDG:GL4E:MPNN:4LYS:UO6Z:RFEK:BI2H:MJSP:BIMJ:NASA:XAFR:CRN7
Docker根目录:/var/lib/Docker
调试模式(客户端):false
调试模式(服务器):false
注册处:
警告:不支持交换限制
实验性:错误
不安全的登记处:
127.0.0.0/8
已启用实时还原:false
Docker版本:
客户:
版本:17.03.1-ce
API版本:1.27
Go版本:go1.7.5
Git提交:c6d412e
建造日期:2017年3月27日星期一17:14:09
OS/Arch:linux/amd64
服务器:
版本:17.03.1-ce
API版本:1.27(最低版本1.12)
Go版本:go1.7.5
Git提交:c6d412e
建造日期:2017年3月27日星期一17:14:09
OS/Arch:linux/amd64
实验性:错误这仅仅是Docker的问题吗?您可以通过yum从repo安装其他东西吗?如果不是,那可能是网络问题。您还可以将
docker info
和docker version
的输出复制到这里吗?您是否有代理?对我来说,这似乎有效。百胜似乎没有任何效果。我阅读了有关将./etc/yum.repos.d/CentOS-Base.repo文件更改为取消对baseUrl的注释的内容。这似乎也不起作用。我得到网络超时:加载的插件:FastTestMirror,ovl无法检索镜像列表错误是12:Timeout on:(28,‘解决30546毫秒后超时’)好的,所以您的问题是第一行的网络问题。首先检查您是否有连接,然后在网站上尝试类似于curl
的方法。
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be much slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true