Skip ping test if container port is only exposed on 127.0.0.1

Since we cannot ping a port that is not exposed externally on the host,
the ping test will fail, giving a false negative.  This change
skips that test for such cases.