How to view the IP address of the Docker container

How to view the IP address of the Docker container

I always thought that Docker had no IP address. In fact, Docker's network template is a bit similar to the host-only mode of the virtual machine we usually use. The container and the host form an independent LAN. The IP of the host is 172.17.0.1, and the corresponding host network name is docker0

這里寫圖片描述

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 

這里寫圖片描述

Then you can use ifconfig to view

這里寫圖片描述

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Docker: Modifying the DOCKER_OPTS parameter in /etc/default/docker does not take effect
  • Implementation of modifying configuration files in Docker container
  • The whole process of deploying .net Core project using Docker on Linux server
  • Detailed installation and use of RocketMQ in Docker
  • Docker private repository management and deletion of images in local repositories
  • Example of how to upload a Docker image to a private repository
  • Detailed explanation of how to solve the problem that the docker container cannot access the host machine through IP
  • How to specify parameter variables externally in docker

<<:  JavaScript canvas to achieve colorful clock effect

>>:  MySQL 5.7.18 Archive compressed version installation tutorial

Recommend

How to install and uninstall open-vswitch in Linux

1. Compile and install ovs from source code: Inst...

How to import and export Cookies and Favorites in FireFox

FireFox is a commonly used browser with many exte...

Detailed explanation of importing/exporting MySQL data in Docker container

Preface We all know that the import and export of...

MySql Group By implements grouping of multiple fields

In daily development tasks, we often use MYSQL...

A brief discussion on the principle of React two-way data binding

Table of contents What is two-way data binding Im...

18 Web Usability Principles You Need to Know

You can have the best visual design skills in the...

MySQL Server 8.0.3 Installation and Configuration Methods Graphic Tutorial

This document records the installation and config...

Implementing file content deduplication and intersection and difference in Linux

1. Data Deduplication In daily work, there may be...

Reasons why MySQL kill cannot kill threads

Table of contents background Problem Description ...

JavaScript history object explained

Table of contents 1. Route navigation 2. History ...

Detailed steps for installing rockerChat in docker and setting up a chat room

Comprehensive Documentation github address https:...

CSS code to achieve 10 modern layouts

Preface I watched web.dev's 2020 three-day li...