Home > Operation and Maintenance > Docker > The docker image started successfully, but it cannot be accessed. What happened?

The docker image started successfully, but it cannot be accessed. What happened?

王林
Release: 2020-12-02 14:58:02
forward
5409 people have browsed it

The docker image started successfully, but it cannot be accessed. What happened?

Problem:

The docker image started successfully but cannot be accessed.

(Related recommendations: docker tutorial)

Solution:

vi /etc/sysctl.conf
Copy after login

or

vi /usr/lib/sysctl.d/00-system.conf
Copy after login

Add the following code:

net.ipv4.ip_forward=1
Copy after login

Restart the network service

systemctl restart network
Copy after login

Check whether the modification is successful

sysctl net.ipv4.ip_forward
Copy after login

If the return value is "net.ipv4.ip_forward = 1", it means success.

The above is the detailed content of The docker image started successfully, but it cannot be accessed. What happened?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template