Installing the ping tool in a container built by Docker

Installing the ping tool in a container built by Docker

Because the Base images pulled by Docker, such as Centos and Ubuntu, are the simplest versions and do not contain the Ping tool. When performing Docker network and Docker link operations on Docker, the Ping tool is often used to test the network between two containers. At this time, the Ping tool is needed.

Below is the command to install the Ping tool in Ubuntu:

sudo apt-get update && apt-get install iputils-ping

Additional knowledge: standard_init_linux.go:211: exec user process caused "no such file or direct" problem

Summarizes some issues on the Internet

In Windows environment, because the file type is DOS, just convert it to Unix and then compile it.

Need to install dos2unix dos2unix file

This problem does not exist on Mac, you need to disable cgo

Add CGO_ENABLED=0 in dockerfile

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build .

In the end, there is really no way

Changing the base image from alpine to from centos will solve the problem

But this image file is relatively large

The above article on installing the ping tool in the container built by Docker is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed steps to install 64-bit Ubuntu system and Docker tool on Raspberry Pi 3B+
  • How to install and configure the Docker Compose orchestration tool in Docker.v19
  • 5 super useful open source Docker tools highly recommended

<<:  HTML Tutorial: Unordered List

>>:  Example of using MRG_MyISAM (MERGE) to implement query after partitioning in MySQL

Recommend

Detailed explanation of Apache website service configuration based on Linux

As an open source software, Apache is one of the ...

HTML implements a fixed floating semi-transparent search box on mobile

Question. In the mobile shopping mall system, we ...

How to solve the Mysql transaction operation failure

How to solve the Mysql transaction operation fail...

How to use node scaffolding to build a server to implement token verification

content Use scaffolding to quickly build a node p...

Detailed explanation of Vue options

Table of contents 1. What are options? 2. What at...

Reasons and solutions for prompting to save action after uploading files in form

The json data must be returned in html format That...

Differences between MySQL CHAR and VARCHAR when storing and reading

Introduction Do you really know the difference be...

mysql5.7 installation and configuration tutorial under Centos7.3

This article shares the MySQL 5.7 installation an...

How to install and deploy gitlab server on centos7

I am using centos 7 64bit system here. I have tri...

Solve the problem of running hello-world after docker installation

Installed Docker V1.13.1 on centos7.3 using yum B...

Some useful meta setting methods (must read)

<meta name="viewport" content="...

SQL insert into statement writing method explanation

Method 1: INSERT INTO t1(field1,field2) VALUE(v00...

Correct use of Vue function anti-shake and throttling

Preface 1. Debounce: After a high-frequency event...

Mysql NULL caused the pit

Using NULL in comparison operators mysql> sele...

MySQL 8.0.11 Installation Tutorial under Windows

This article records the installation tutorial of...