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

angryTom
Release: 2020-03-13 11:13:34
Original
3300 people have browsed it

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
Copy after login

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
Copy after login

2. Restart the network

systemctl restart network
Copy after login

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 thedocker tutorialcolumn 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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!