Docker Community Forums

Share and learn in the Docker community.

Ping from within a container does not actually ping

(Stevepacker) #1

Expected behavior

When performing a ping on my host machine to Google’s DNS server, I get 30-60ms. From within a container pinging, I expect the same or slower ping responses.

From within the container, when I ping, an IP address that does not exist, the ping should report 100% packet loss.

docker run --rm -it alpine ping -c 1
docker run --rm -it alpine ping -c 1

Actual behavior

Pings to both and from within the container respond with lightning fast response times (under 1ms).


Host: OS X El Capitan (10.11.4)
Docker: 1.11.1-beta10 (build 6662)
Network: wifi
Container Images tested:

  • alpine
  • phusion/baseimage

(Dave Tucker) #2

Thanks for the report… we were waiting for someone to notice this :stuck_out_tongue:
It’s being tracked on issue (#1925) on our tracker and we have a fix in the pipeline.
I’m hoping it will be available in the next 2-3 weeks!
Keep the feedback coming, and thanks for trying Docker for Mac!

(Qsnyder) #3

any update to this?
running 1.12.0-rc4-beta20 – and the error still persists as of 7/27.
this is particularly an issue as i’m using a toolset that depends on certain pings failing, which never happen.

(Macjl) #4

Same behaviour here, with the final release of Docker for Mac. I can’t use Docker for Mac with tools that rely on ping to detect presence of devices on my network.

(Yallop) #5

There’s an issue open for this problem on the public tracker:

(Jakubkozlowski) #6

I can see the same behaviour with Docker for Windows. When the fix comes is it going to be only for Docker for Mac? (since the github path would suggest that).

(Yallop) #7

We plan to fix the issue on both Mac and Windows, but the fixes may land at different times.

(Kwerle) #8

+1 - because it looks like I have to +1 to get feedback on updates?

(Jeremy010203) #9

+1 too really need this update

(Veetow) #10

What’s the status on this? I’m still seeing this issue today in an alpine-based container.

(Chiajr) #11

I have the same issue. Inside a container it doesnt matter which IP i am pinging it does get responses.

I am using Version 17.03.1-ce-mac5 (16048)

(Chiajr) #12

Is there any update on this?

(Tkeeler) #13

This issue has been open way to long and is disrupting lots of development efforts. Can we get an ETA on resolution?

(Mkorenkov) #14

still reproducible. Can we please get this fixed?