簡體   English   中英

Docker:在 centos 映像上安裝庫

[英]Docker: Installing libraries on centos image

我是 Docker 的新手。 我創建了以下 Dockerfile 並運行它:

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

我收到以下錯誤/輸出:

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

將構建上下文發送到 Docker 守護進程 2.048 kB

第 1/3 步:從 centos:latest ---> a8493f5f50ff

步驟 2/3:ENV 容器 docker ---> 在 e8e244c0c9d6 中運行 ---> 07355d554b3a 刪除中間容器 e8e244c0c9d6

第 3/3 步:運行 yum -y update && yum clean all ---> 在 68ad7f2f86e2 中運行加載的插件:fastestmirror,ovl

配置的存儲庫之一失敗(未知),並且 yum 沒有足夠的緩存數據來繼續。 在這一點上,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 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 根目錄:/var/lib/docker/aufs 后備文件系統:extfs 目錄:78 Dirperm1 支持:真實記錄驅動器:JSON文件CGROUP驅動程序:cgroupfs插件:體積:本地網絡:橋主macvlan空覆蓋群:激活運行時:runc默認運行:runc二進制代碼init:搬運工-INIT containerd版本:4ab9917febca54791c5f071a9d1f404867857fcc runc版本:54296cf40ad8143b62dbcaa1d90e520a2136ddfe的init版本:949e6fa 安全選項:apparmor seccomp 配置文件:默認內核版本:4.4.0-72-generic 操作系統:Ubuntu 16.04.1 LTS 操作系統類型:linux 架構:x86_64 CPU:1 總內存:3.859 GiB 名稱:GGNLABVM-JUPER6 ID:KXDG :GL4E:MPNN:4LYS:UO6Z:RFEK:BI2H:MJSP:BIMJ:NASA:XAFR:CRN7 Docker 根目錄:/var/lib/docker 調試模式(客戶端):假調試模式(服務器):假注冊表: https: //index.docker.io/v1/警告:不支持交換限制實驗:false Insecur e Registries: 127.0.0.0/8 Live Restore Enabled: false

Docker 版本:客戶端:版本:17.03.1-ce API 版本:1.27 Go 版本:go1.7.5 Git 提交: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 提交:c6d412e 構建:Mon Mar 27 17:14:09 2017 OS/Arch:linux/amd64 實驗:false

僅僅是 Docker 的問題嗎? 你可以用 yum 安裝來自 repo 的其他東西嗎? 如果不是它可能是網絡問題。 你也可以在這里復制docker infodocker version的輸出嗎?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM