当前位置: 首页 > 知识库问答 >
问题:

Docker:在centos映像上安装库

颛孙越
2023-03-14

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

来自Centos:最新的ENV container docker运行YUM-Y更新&&yum clean all

我收到以下错误/输出:

root@ggnlabvm-juper6:~/docker_test#docker build-t test。

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

步骤1/3:来自Centos:最新-->a8493f5f50ff

步骤2/3:ENV容器Docker-->在e8e244c0c9d6中运行-->07355D554B3A移除中间容器e8e244c0c9d6

步骤3/3:运行YUM-Y update&&yum clean all-->在68AD7F2F86E2加载的插件中运行:fastestmirror,ovl

 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

如何解决此问题?

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

Docker信息:集装箱:25运行:3暂停:0停止:22幅图像:13服务器版本:17.03.1-CE存储驱动程序:aufs根目录:/var/lib/docker/aufs支持文件系统:extfs dirs:支持78个Dirperm1:真实日志驱动程序:json-file Cgroup FS驱动程序:cgroupfs插件:卷:本地网络:桥接主机macvlan空覆盖群:不活动运行时间:runc默认运行时间:runc Init二进制:docker-init容器版本:4AB9917FEBCA54791C5F071A9D1F404867857FCC runc版本:54296CF40AD8143B62DBCAA1D90E520A2136DDFE Init版本:949E6FA安全选项:设备seccomp配置文件:默认内核版本:4.4.0-72-通用操作系统:Ubuntu 16.04.1LTS OSTType:linux体系结构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注册表:https://index.Docker.io/v1/警告:无交换限制支持实验:false不安全注册表:127.0.0.0/8启用实时还原:false

Docker版本:客户端:版本:17.03.1-CE API版本:1.27 Go版本:Go1.7.5 Git提交:c6d412e构建:Mon 3月27日17:14:09 2017 OS/arch:Linux/amd64

服务器:版本:17.03.1-CE API版本:1.27(最低版本1.12)Go版本:GO1.7.5 Git提交:c6d412e构建:Mon 3月27日17:14:09 2017 OS/arch:Linux/AMD64实验:false

共有1个答案

贝钧
2023-03-14

只是Docker的问题吗?你能用百胜装Repo的其他东西吗?如果没有,可能是网络问题。您还可以将Docker InfoDocker Version的输出复制到这里吗?

 类似资料:
  • 这是我第一次尝试创建Docker形象,我希望有人能帮助我。我的Dockerfile大致如下所示: 基本上,我只是为了扩展jar文件而安装Java。运行makefile时,出现以下错误: /bin/sh:1:/usr/lib/jvm/java-7-openjdk-amd64:权限被拒绝 我一直试图效仿这个例子:https://registry.hub.docker.com/u/barnybug/op

  • 我有一个来自centos的docker容器,在那里我为jenkins的奴隶安装了maven和JDK1.7(以减少jenkins安装jdk和maven的构建时间) 当我启动一个容器 [root@095586D24AD9/]#java-版本 java版本“1.7.0_51” Java(TM)SE运行时环境(build 1.7.0_51-B13) docker运行-t-i jenkv1/bin/sh j

  • CentOS(Community Enterprise Operating System)是 Linux 发行版之一,它是来自于 Red Hat Enterprise Linux(RHEL) 依照开放源代码规定发布的源代码所编译而成。由于出自同样的源代码,因此有些要求高度稳定性的服务器以 CentOS 替代商业版的 Red Hat Enterprise Linux 使用。 1、查看可用的 Cent

  • 主要内容:使用官方安装脚本自动安装,手动安装,使用官方源地址(比较慢),阿里云,清华大学源Docker 支持以下的 64 位 CentOS 版本: CentOS 7 CentOS 8 更高版本... 使用官方安装脚本自动安装 安装命令如下: 也可以使用国内 daocloud 一键安装命令: 手动安装 卸载旧版本 较旧的 Docker 版本称为 docker 或 docker-engine 。如果已安装这些程序,请卸载它们以及相关的依赖项。 $ sudo yum remove docke

  • 以下版本的CentOS 支持 Docker : CentOS 7 (64-bit) CentOS 6.5 (64-bit) or later 该指南可能会适用于其它的 EL6/EL7 的 Linux 发行版,譬如 Scientific Linux 。但是我们没有做过任何测试。 请注意,由于 Docker 的局限性,Docker 只能运行在64位的系统中。 内核支持 目前的 CentOS 项目,仅发

  • 以下版本的CentOS 支持 Docker : CentOS 7 (64-bit) CentOS 6.5 (64-bit) or later 该指南可能会适用于其它的 EL6/EL7 的 Linux 发行版,譬如 Scientific Linux 。但是我们没有做过任何测试。 请注意,由于 Docker 的局限性,Docker 只能运行在64位的系统中。 内核支持 目前的 CentOS 项目,仅发