首页 文章

Docker:在centos映像上安装库

提问于
浏览
0

我是Docker的新手 . 我创建了以下Dockerfile并运行它:

FROM centos:最新的ENV集装箱码头RUN yum -y update && yum clean all

我收到以下错误/输出:

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

将构建上下文发送到Docker守护程序2.048 kB

第1/3步:FROM centos:最新---> a8493f5f50ff

步骤2/3:ENV容器泊坞窗--->在e8e244c0c9d6中运行---> 07355d554b3a删除中间容器e8e244c0c9d6

步骤3/3:运行yum -y update && yum clean all --->在68ad7f2f86e2中运行加载的插件:fastermirror,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

无法为repo找到有效的baseurl:base / 7 / x86_64

我该如何解决这个问题?

仅供参考:我想在我的应用程序之后安装其他python依赖库 .

Docker信息:容器:25运行:3暂停:0停止:22图像:13服务器版本:17.03.1-ce存储驱动程序:aufs Root目录:/ var / lib / docker / aufs备份文件系统:extfs目录:78 Dirperm1支持:true日志驱动程序:json-file Cgroup驱动程序:cgroupfs插件:卷:本地网络:桥接主机macvlan null覆盖Swarm:非运行时运行时:runc默认运行时:runc Init二进制:docker-init containerd版本:4ab9917febca54791c5f071a9d1f404867857fcc runc版本:54296cf40ad8143b62dbcaa1d90e520a2136ddfe init版本:949e6fa安全选项:apparmor seccomp配置文件:默认内核版本:4.4.0-72-通用操作系统:Ubuntu 16.04.1 LTS OSType:linux架构:x86_64 CPU:1总内存:3.859 GiB名称:GGNLABVM-JUPER6 ID:KXDG :GL4E:MPNN:4LYS:UO6Z:RFEK:BI2H:MJSP:BIMJ:NASA:XAFR:CRN7 Docker Root目录:/ var / lib / docker调试模式(客户端):false调试模式(服务器):false注册表:https://index.docker.io/v1/警告:无交换限制支持实验:false不安全注册管理机构:12 7.0.0.0/8 Live Restore Enabled:false

Dockre版本:客户端:版本:17.03.1-ce API版本:1.27 Go版本:go1.7.5 Git commit:c6d412e内置:Mon Mar 27 17:14:09 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 OS / Arch:linux / amd64实验:false

1 回答

  • 0

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

相关问题