执行 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