Docker 报错WARNING: IPv4 forwarding is disabled. Networking will not work.

启动SQLServer镜像

[root@double ~]# docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=***' -p 1433:1433 -d mcr.microsoft.com/mssql/server

在启动SQLServer 镜像时包以下错


WARNING: IPv4 forwarding is disabled. Networking will not work.

解决办法

[root@double ~]# vi /usr/lib/sysctl.d/00-system.conf

添加如下代码:

net.ipv4.ip_forward=1

重启network服务

# systemctl restart network

删除刚才报错的容器,重新启动新的

docker rm -f dbdb74daa180

你可能感兴趣的:(Docker 报错WARNING: IPv4 forwarding is disabled. Networking will not work.)