2017-04-24 137 views
0

我是Docker的新手。我创建了以下Dockerfile并运行它:Docker:在CentOS上安装库

从CentOS的:最新 ENV集装箱码头工人 运行yum -y更新& &百胜清洁所有

我收到以下错误/输出:

根@ GGNLABVM-JUPER6:〜/ docker_test#docker build -t test。

发送建立上下文码头工人守护2.048 KB

步骤1/3:从CentOS的:最新 ---> a8493f5f50ff

步骤2/3:ENV集装箱码头工人 --->运行中e8e244c0c9d6 ---> 07355d554b3a 卸下中间容器e8e244c0c9d6

步骤3/3:运行yum -y更新& &荫清洁所有 --->运行中68ad7f2 f86e2 加载的插件:最快镜像,ovl

其中一个配置的存储库失败(未知), 和yum没有足够的缓存数据继续。在这一点上,唯一可以做的安全事情就是失败。有几种方法来变通“修理”这样的:

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 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 

无法找到回购有效的baseURL时:基础/ 7/x86_64的

我该如何解决这个问题?

仅供参考:我想为我的应用程序安装其他依赖于python的库。

泊坞窗信息: 容器:25 运行:3 暂停:0 停止:22张 图片:13 服务器版本:17.03.1-CE 存储驱动程序:AUFS 根目录:在/ var/lib中/泊坞窗/ AUFS 备份文件系统:extfs 迪尔斯:78 Dirperm1支持:真 记录司机:JSON文件 CGROUP司机:cgroupfs 插件: 卷:本地 网络:桥主macvlan空覆盖 群:我nactive 运行时:runc 默认运行:runc 二进制代码init:搬运工,初始化 containerd版本:4ab9917febca54791c5f071a9d1f404867857fcc runc版本:54296cf40ad8143b62dbcaa1d90e520a2136ddfe 初始化版本:949e6fa 安全选项: AppArmor的 的Seccomp 简介:默认 内核版本:4.4。 0-72-generic 操作系统:Ubuntu 16.04.1 LTS OSType:linux 架构:x86_64 CPU:1 总内存:3。859吉布 名称:GGNLABVM-JUPER6 ID:KXDG:GL4E:MPNN:4LYS:UO6Z:RFEK:BI2H:MJSP:BIMJ:NASA:XAFR:CRN7 多克尔根目录:在/ var/lib中/搬运工 调试模式(客户端):假 调试模式(服务器):假 注册地:https://index.docker.io/v1/ 警告:没有交换限制支持 试验:假 不安全注册处: 127.0.0.0/8 现场还原启用:假

Dockre版本: 客户端: 版本:17.03.1-ce API版本:1.27 前往版本:go1.7.5 git的承诺:c6d412e 内置:星期一3月27日17点14分09秒2017年 OS /拱门:LINUX/AMD64

服务器: 版本:17.03.1-CE API版本:1.27(最低版本1.12) 转到版本:go1.7.5 git的承诺:c6d412e 内置:星期一3月27日17点14分09秒2017年 OS /拱门:LINUX/AMD64 试验:假

+0

你是否支持代理?对我来说,它似乎工作。 – lvthillo

回答

0

难道仅仅是一个问题泊坞窗?你可以用yum安装其他回购项目吗?如果不是它可能是一个网络问题。还可以在这里复制docker infodocker version的输出吗?

+0

没有。没有与百胜似乎工作。我阅读了有关更改./etc/yum.repos.d/CentOS-Base.repo文件以取消注释baseUrl的信息。这似乎也不起作用。我得到网络超时: 加载的插件:fastestmirror,OVL 无法检索镜像列表http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container错误是 12:超时在http://镜像列表.centos.org /?release = 7&arch = x86_64&repo = os&infra = container:(28,'解决30546毫秒后超时') – Twix

+0

好吧,您的问题是第一行的网络问题。首先检查你是否有连接,并在网站上尝试类似'curl'的东西。 – xFuture