Home  >  Article  >  Operation and Maintenance  >  What should I do if there is no communication between docker on the host?

What should I do if there is no communication between docker on the host?

angryTom
angryTomOriginal
2020-03-13 11:13:343521browse

What should I do if there is no communication between docker on the host?

What should I do if the docker on the host cannot communicate?

Problems: The internal network of the docker host is normal, and other The host's connection fails, other hosts cannot connect to the port mapped on the docker host, and docker cannot connect to external hosts.

The server environment is as follows:

The system is centos

docker info:

WARNING: IPv4 forwarding is disabled

WARNING: bridge-nf-call-iptables is disabled

WARNING: bridge-nf-call-ip6tables is disabled

Resolve host The method to solve the problem of communication between docker on the computer is as follows:

1. Edit the configuration file

vim /etc/sysctl.conf

Add the following code in the file

net.bridge.bridge-nf-call-ip6tables=1
net.bridge.bridge-nf-call-iptables=1
net.bridge.bridge-nf-call-arptables=1
net.ipv4.ip_forward=1

2. Restart the network

systemctl restart network

Check docker info again, the warning disappears, and the docker network on the host returns to normal.

For more related tutorials, please pay attention to the docker tutorial column on the PHP Chinese website.

The above is the detailed content of What should I do if there is no communication between docker on the host?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn