评论列表
zoxm 2020-05-12 15:07:33
如果报错和我一样。不用怕,我已经走在前面
[root@localhost ~]# docker run learn/ping ping www.baidu.com
WARNING: IPv4 forwarding is disabled. Networking will not work.
container_linux.go:235: starting container process caused "exec: \"ping\": executable file not found in $PATH"
/usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:235: starting container process caused "exec: \"ping\": executable file not found in $PATH".
两个步骤
①修改 vi /etc/sysctl.conf文件,添加 net.ipv4.ip_forward = 1
②docker run learn/ping /bin/sh -C && ping www.baidu.com
zoxm 2020-05-12 15:09:40
忘记说了,步骤①之后重启网络服务和docker
CentOS7命令:
systemctl restart network
systemctl restart docker
CentOS6的命令会不一样,ubuntu的不知道呢
docker 2020-09-28 10:13:12
感谢分享
Letopher 2020-03-14 11:59:01
CTRL+C退出
lxx 2019-12-06 01:04:58
root@node1 ~]# docker commit 2f7 learn/ping
sha256:cbd4e6e7053ec0093b21f30cc06feeba9ac6781cf7c890e42e7d33c942c94e72
[root@node1 ~]# docker run learn/ping ping www.google.com后面没有数据显示了。
睡觉爱说话 2019-08-08 12:00:24
ubuntu 运行以后怎么停下来....
稀里糊涂干运维 2019-07-30 10:56:51
ping命令一直执行下去了咋整
稀里糊涂干运维 2019-07-30 10:45:29
我也想问下,这个评论咋排的
豆角 2019-05-29 08:53:13
命令错了,是 learn/ping ,不是lean/ping ,害我半天找不到原因...
酱紫 2019-01-04 14:47:37
└┤ docker run learn/ping ping www.google.com
^CPING www.google.com (31.13.72.34) 56(84) bytes of data.

--- www.google.com ping statistics ---
70 packets transmitted, 0 received, 100% packet loss, time 69552ms
小彬彬 2018-10-04 12:33:17
我们哪里安装了ping命令了?
好人 2018-01-16 13:51:56
运行PING不对呀,找不到路径:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused "exec: \"ping\": executable file not found in $PATH": unknown.
cdm 2020-10-04 19:55:41
docker run learn/tutorial /bin/sh -C && ping www.baidu.com
阿五 2021-05-26 08:54:29
感谢老哥,可以了
1/3
发表评论
肆 减 柒 =
评论通过审核后显示。