libtasn1

Docker的Ubuntu镜像安装的容器无ifconfig命令和ping命令

此生再无相见时 提交于 2020-12-01 21:19:55
就这三步骤,下面的是实例不看也罢。 apt- get update ###第一步一定要先执行这个更新下。不更新下面的安装命令会显示找不到网络包 // ifconfig apt install net- tools // ping apt install iputils-ping 具体实例如下: root@localhost ~]# docker run -it ubuntu: 16.04 /bin/ bash #####进入容器内 root@f87aa9698ac1: / # root@f87aa9698ac1: /# ping 8.8 . 8.8 ###首先ping会显示没有安装这个命令 bash: ping: command not found root@f87aa9698ac1: /# apt install net- tools ###直接执行安装命令是显示找不到网络包 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package net - tools root@f87aa9698ac1: /# ping 8.8 . 8.8 bash: ping: command not found root