Docker容器报错问题
程序员文章站
2024-03-12 21:58:08
...
-
创建容器时报错
[[email protected] ~]# docker run -d -p 3306:3306 --name mysql mysql WARNING: IPv4 forwarding is disabled. Networking will not work.
解决方法:主机开启路由转发功能即可
[[email protected] ~]# vim /etc/sysctl.conf # 永久更改方法 net.ipv4.ip_forward = 1 [[email protected] ~]# systemctl restart network [[email protected] ~]# docker run -d -p 3306:3306 --name mysql mysql 51e72274ecbb5eb8c17a843381fd5a595582daf818f88608d91d58f14be8e539
推荐阅读