请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

IPv4 forwarding is disabled. Networking will not work.

问题

执行 dockerfile 安装 vim 的步骤时,提示  [Warning] IPv4 forwarding is disabled. Networking will not work.

dockerfile 内容:

FROM centos:7
RUN yum install -y vim

具体表现

执行 dockerfile 命令 docker build -t test/centos ./Dockerfile ,在执行到 step 2 的时候,提示网络不可用。

➜  docker docker build -t test/centos ./
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM centos:7
7: Pulling from library/centos
75f829a71a1c: Pull complete
Digest: sha256:19a79828ca2e505eaee0ff38c2f3fd9901f4826737295157cc5212b7a372cd2b
Status: Downloaded newer image for centos:7
 ---> 7e6257c9f8d8
Step 2/2 : RUN yum install -y vim
 ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
 ---> Running in bdb9cff0ea66
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors

请问 [Warning] IPv4 forwarding is disabled. Networking will not work. 这个问题应该怎么解决呢?


系统环境:腾讯云 CentOS Linux release 7.8.2003 (Core)

docker版本:Docker version 19.03.12, build 48a66213fe

正在回答 回答被采纳积分+3

2回答

麦兜搞IT 2020-09-14 04:01:31

https://blog.csdn.net/weiguang1017/article/details/76212203 类似的问题您可以从网上找到答案,比如百度和google

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号