Home  >  Article  >  Operation and Maintenance  >  How to check the ip of docker container

How to check the ip of docker container

尚
Original
2020-03-25 13:49:287372browse

How to check the ip of docker container

You can use the ifconfig command to view the ip of the docker container:

Install the ifconfig command

The reason why "bash: ipconfig" appears : command not found" error message,

is actually because the ifconfig command is not installed on the system.

We only need to install this command, but this command cannot be installed directly.

Instead, a network tool package (net-tools) needs to be installed.

The ifconfig command is included in the "net-tools" software package.

1. yum installs the "net-tools" software package

[root@2c624c92de27 /]# yum -y install net-tools   // -y 在安装过程中自动回答“yes”

2. The installation process is as follows:

How to check the ip of docker container

Use " ifconfig" to view the IP information of the container

[root@2c624c92de27 /]# ifconfig   // 本机查看网卡信息

How to check the ip of docker container

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

The above is the detailed content of How to check the ip of docker container. 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