我正在尝试在虚拟机中遵循Docker教程。我尝试使用以下命令在ubuntu docker容器中安装ping
sudo docker run ubuntu apt-get install ping
问题是码头工人没有安装任何东西,并给出了如下答案
$ sudo docker run ubuntu apt-get install ping
Reading package lists...
Building dependency tree...
Package ping is a virtual package provided by:
inetutils-ping 2:1.8-6
iputils-ping 3:20101006-1ubuntu1
E: Package 'ping' has no installation candidate
$
当我尝试安装任何东西时,也会出现相同的问题。
这些是我的图像:
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
<none> <none> 3a28cc5bcc53 19 minutes ago 247.6 MB
baselDaemon latest 4e892058b0b2 4 days ago 204.4 MB
ubuntu 13.10 9f676bd305a4 2 weeks ago 178 MB
ubuntu saucy 9f676bd305a4 2 weeks ago 178 MB
ubuntu 13.04 eb601b8965b8 2 weeks ago 166.5 MB
ubuntu raring eb601b8965b8 2 weeks ago 166.5 MB
ubuntu 12.10 5ac751e8d623 2 weeks ago 161 MB
ubuntu quantal 5ac751e8d623 2 weeks ago 161 MB
ubuntu 10.04 9cc9ea5ea540 2 weeks ago 180.8 MB
ubuntu lucid 9cc9ea5ea540 2 weeks ago 180.8 MB
ubuntu 12.04 9cd978db300e 2 weeks ago 204.4 MB
ubuntu latest 9cd978db300e 2 weeks ago 204.4 MB
ubuntu precise 9cd978db300e 2 weeks ago 204.4 MB
learn/tutorial latest 8dbd9e392a96 10 months ago 128 MB
另外,当我运行时,sudo docker run ubuntu apt-get install ping
这里使用的“ ubuntu”是什么?
先感谢您。
造访:askubuntu.com/q/14685
—
Pandya
如果您安装ping,则还可以包括nslookup;apt-get install dnsutils
—
PodTech.io