错误集——docker构建镜像时,yum安装卡住

[root@promote /home/docker-lic-volume] # docker build -f /home/docker-lic-volume/mydockerfile  -t mycentos:1.0 .
Sending build context to Docker daemon  2.048kB
Step 1/10 : FROM centos
 ---> 300e315adb2f
Step 2/10 : MAINTAINER lic<935704787@qq.com>
 ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
 ---> Running in 9c9a4fd38b8d
Removing intermediate container 9c9a4fd38b8d
 ---> 2f7ee6776d3b
Step 3/10 : ENV MYPATH /usr/local
 ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
 ---> Running in 154cf565aec9
Removing intermediate container 154cf565aec9
 ---> 5a3243d0aab5
Step 4/10 : WORKDIR $MYPATH
 ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
 ---> Running in 651c60b56030
Removing intermediate container 651c60b56030
 ---> 728bae31dac0
Step 5/10 : RUN yum -y install vim
 ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
 ---> Running in e215cc74ad99
^C
  • 告警:ip转发功能未打开,网络将无法生效
#echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
#sysctl -p

Linux内核参数配置文件修改(/proc/sys与/etc/sysctl.conf变量对应关系)

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值