问题汇总

docker错误总结

Linux · 12月5日 · 2019年

1、docker启用容器:WARNING: IPv4 forwarding is disabled. Networking will not work.

[root@docker _data]# docker run -d -p 88:80 --name nginx02 --mount src=tcp_01,dst=/usr/local/nginx/html nginx:1.16 
WARNING: IPv4 forwarding is disabled. Networking will not work.
0ffc855cd888644338fdb59b7599595d31ef4ab9f28b207f4846a6421ddf8c43

 

解决

为Linux内核开启IPV4转发: vim /usr/lib/sysctl.d/00-system.conf,添加以下内容即可。

net.ipv4.ip_forward=1

 

重启网

systemctl restart network

2、docker启用容器:Failed to start docekr.service: Unit not found.

[root@k8s-node1 system]# systemctl start docekr
Failed to start docekr.service: Unit not found.

决办法:

[root@k8s-node1 bin]# systemctl unmask docker.service
[root@k8s-node1 bin]# systemctl start docker

 

0 条回应