如何在docker容器中安装ifconfig、netstat、ping、vim等网络测试和文本编辑工具?
- 内容介绍
- 文章标签
- 相关推荐
本文共计122个文字,预计阅读时间需要1分钟。
首先确保Docker容器能联网,使用以下命令安装ifconfig和netstat:
- CentOS使用yum安装: yum install net-tools
- Ubuntu/Debian等使用apt-get安装: apt-get install net-tools
首先确保docker容器能联网①centos使用yum进行安装②Ubuntudebian等使用apt-get进行安装安装ifconfig、netstat命令首先确保docker容器能联网
① centos使用yum进行安装
② Ubuntu/debian等使用apt-get进行安装
安装ifconfig、netstat命令
apt-get install net-tools
安装ping命令
apt-get install iproute2
安装telnet命令
apt-get install telnet
注如果使用yum或apt-get时报错无法安装先更新一下。
执行:yum update 或 apt-get update然后再进行安装
本文共计122个文字,预计阅读时间需要1分钟。
首先确保Docker容器能联网,使用以下命令安装ifconfig和netstat:
- CentOS使用yum安装: yum install net-tools
- Ubuntu/Debian等使用apt-get安装: apt-get install net-tools
首先确保docker容器能联网①centos使用yum进行安装②Ubuntudebian等使用apt-get进行安装安装ifconfig、netstat命令首先确保docker容器能联网
① centos使用yum进行安装
② Ubuntu/debian等使用apt-get进行安装
安装ifconfig、netstat命令
apt-get install net-tools
安装ping命令
apt-get install iproute2
安装telnet命令
apt-get install telnet
注如果使用yum或apt-get时报错无法安装先更新一下。
执行:yum update 或 apt-get update然后再进行安装

