Advertisement

使用 Dockerfile为httpd创建镜像时,在Dockerfile中执行yum -y update步骤出现错误

阅读量:

文章结构概述

    • ①异常状况表现
      • ②应对策略构想

故障现象描述

场景:利用 Dockerfile 构建一个最基础的 httpd 镜像

出现错误的代码如下:

复制代码
    [root@localhost ~]docker build -t httpd:centos .
    ...
    ...
    Step 3/9 : RUN yum -y update
     ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
     ---> Running in a0a858748903
    CentOS Linux 8 - AppStream                      0.0  B/s |   0  B     04:00    
    Errors during downloading metadata for repository 'appstream':
      - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=con

全部评论 (0)

还没有任何评论哟~