https://blog.csdn.net/king_gun/article/details/78423115

【问题】

从docker hub上拉取到则镜像centos:6.7在执行ping命令是报错:


  1. [root@dcd9947346b3 /]# ping
  2. bash: ping: command not found

百度上搜索,查到linux下安装ping命令的方法为:

apt-get install inetutils-ping

但是docker镜像中不存在apt-get指令,使用yum install inetutils-ping找不到对应的包 【解决】

yum 安装ping命令如下:

yum install -y iputils

docker下centos安装ping命令的更多相关文章

  1. centos安装tree命令

    centos安装tree命令 sudo yum -y install tree windows安装tree命令 我的另一篇

  2. CentOS 安装tab命令补全

    CentOS 安装tab命令补全 1. 安装epel 源 yum -y install epel-release 2. 加快yum速度 yum -y install yum-plugin-fastes ...

  3. CentOS 安装 semanage 命令

    CentOS 安装 semanage 命令 在服务器上运行: [root@ca1 ~]# yum install policycoreutils-python vim /etc/selinux/con ...

  4. linux下安装 ping 命令

    使用docker仓库下载的ubuntu 14.04 镜像.里面精简的连 ping 命令都没有.google 百度都搜索不到ping 命令在哪个包里. 努力找了半天,在一篇文章的字里行间发现了 ping ...

  5. Docker Ubuntu中安装ping ifconfig命令

    Ubuntu 容器环境安装ping ifconfig 进入容器执行:ifconfig ping 没有该命令 apt-get update ###命令 ifconfig apt-get install ...

  6. CentOS执行ping命令报错 name or service not know

    在虚拟机上安装的CentOS,但是当执行ping命令的时候,提示name or service not known 解决方法如下: 1. 添加DNS服务器 vi /etc/resolv.conf 1 ...

  7. Docker Compose的安装及命令补全

    安装Compose Compose的安装有多种方式,例如通过shell安装.通过pip安装.以及将compose作为容器安装等等.本文讲解通过shell安装的方式.其他安装方式如有兴趣,可以查看Doc ...

  8. Docker Ubuntu容器安装ping(zz)

    更新apt-get的软件包信息,然后再安装 sudo docker run ubuntu apt-get update sudo docker run ubuntu apt-get install i ...

  9. docker的基本安装和命令详解

    docker的安装 yum install docker-io docker的启动 /bin/systemctl start docker.service docker查找镜像 docker sear ...

随机推荐

  1. hdu3642 Get The Treasury 线段树--扫描线

    Jack knows that there is a great underground treasury in a secret region. And he has a special devic ...

  2. wekpack笔记

    1. webpack 是一个用来构建我们应用程序中的 JavaScript 模块的工具: 2. 可以从CLI 或 API来开始使用 webpack.这里只讲从CLI来使用它: 3. 安装,需要在nod ...

  3. JS中map和foreach的区别以及some和every的用法

    一.原生JS forEach()和map()遍历 共同点: 1.都是循环遍历数组中的每一项. 2.forEach() 和 map() 里面每一次执行匿名函数都支持3个参数:数组中的当前项item,当前 ...

  4. linux服务器进程信息查看命令

    #lsof 列出当前系统打开文件,常与-i选项使用,用于查看某个端口被哪个程序占用 [root@bogon ~]# lsof -i:80 COMMAND PID USER FD TYPE DEVICE ...

  5. wget命令的使用

    wget是在命令行下载文件的命令 -c 断点续传,用于大文件的下载或者网络不稳定的情况下,一般不写也可以 -P 指定下载到那个目录(是大写的P) 举例 [root@bogon local]# wget ...

  6. oracle-rman-2

    归档日志的备份 RMAN> list archivelog all;show archivelog deletion policy;configure archivelog deletion p ...

  7. 推荐一篇文章 《为什么C语言不会过时?》

    <为什么C语言不会过时?>    文章地址 : https://mp.weixin.qq.com/s?__biz=MzAxOTc0NzExNg==&mid=2665515153&a ...

  8. taro 组件的外部样式和全局样式

    自定义组件对应的样式文件,只对该组件内的节点生效. 编写组件样式时,需要注意以下几点: 组件和引用组件的页面不能使用 id 选择器(#a).属性选择器([a])和标签名选择器,请改用 class 选择 ...

  9. TypeScript 之 JSX

    https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/JSX.html JSX中,类型断言必须使用as操作符. 类型检查 ...

  10. Typescript学习总结之接口

    接口 用来建立某种代码约定,使得其他开发者在调用某个方法或者创建新的类时必须遵守接口所定义的代码约定 1. 接口声明属性 interface IStudent { name: string; age: ...