Home>Article>Operation and Maintenance> How to check the IP address of a docker container

How to check the IP address of a docker container

王林
王林 forward
2020-12-07 15:40:43 4066browse

How to check the IP address of a docker container

Docker's network template is somewhat similar to the host-only mode we usually use virtual machines. The container and the host form an independent LAN. The host's IP is 172.17.0.1, corresponding to The network name of the host is docker0.

(Related recommendations:docker tutorial)

How to check the IP address of a docker container

So if you want to see the ip address of the docker container, you only need to install net- tools

yum install net-tools -y

How to check the IP address of a docker containerYou can check it with ifconfig after that

How to check the IP address of a docker container

The above is the detailed content of How to check the IP address of a docker container. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete