Docker:在CentOS映像上安装库

我是Docker的新手。 我创build了下面的Dockerfile并运行它:

FROM centos:最新的ENV容器docker RUN yum -y update && yum clean all

我收到以下错误/输出:

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

发送构build上下文到Docker守护进程2.048 kB

步骤1/3:FROM centos:latest —> a8493f5f50ff

步骤2/3:ENV集装箱docker—>在e8e244c0c9d6 —> 07355d554b3a中运行拆卸中间集装箱e8e244c0c9d6

第3/3步:运行yum -y update && yum clean all —>在68ad7f2f86e2中运行加载的插件:fastermirror,ovl

其中一个configuration的存储库失败(未知),yum没有足够的caching数据继续。 在这一点上,唯一可以做的安全的事情是失败的。 有几种方法来解决这个问题:

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 

无法find有效的baseurl回购:base / 7 / x86_64

我该如何解决这个问题?

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

Docker信息:容器:25运行:3暂停:0停止:22图像:13服务器版本:17.03.1-ce存储驱动程序:aufs根目录:/ var / lib / docker / aufs支持文件系统:extfs Dirperm1支持:truelogging驱动程序:json-file Cgroup驱动程序:cgroupfs插件:卷:本地networking:桥主机macvlan空覆盖群集:不活动运行时:runc默认运行时:runc初始化二进制文件:docker-init容器版本:4ab9917febca54791c5f071a9d1f404867857fcc runc版本:54296cf40ad8143b62dbcaa1d90e520a2136ddfe初始版本:949e6fa安全选项:apparmor seccompconfiguration文件:default内核版本:4.4.0-72-generic操作系统:Ubuntu 16.04.1 LTS OSType:linux架构:x86_64 CPU:1总内存:3.859 GiB名称:GGNLABVM-JUPER6 ID:KXDG (客户端):falsedebugging模式(服务器):falseregistry: https: //www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&variant=zh-cn反向链接: //index.docker.io/v1/警告:没有交换限制支持实验:错误Insecur e注册pipe理机构:127.0.0.0/8 Live Restore Enabled:false

Dockre版本:Client:版本:17.03.1-ce API版本:1.27 Go版本:go1.7.5 Git commit:c6d412e内置:Mon Mar 27 17:14:09 2017 OS / Arch:linux / amd64

服务器:版本:17.03.1-ce API版本:1.27(最低版本1.12)Go版本:go1.7.5 Git commit:c6d412e内置:Mon Mar 27 17:14:09 2017 OS / Arch:linux / amd64实验:false

这只是Docker的问题吗? 你可以用yum安装其他的东西吗? 如果不是它可能是一个networking问题。 还可以在这里复制docker infodocker version的输出吗?

Interesting Posts