Problems installing ping in docker

According to:

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

Try with:

sudo docker run ubuntu apt-get install iputils-ping

You choose a 'ubuntu' with repository:tag in place of IMAGE in RUN command

sudo docker run ubuntu:lucid command

run apt-get update once before the install:

sudo docker run ubuntu apt-get update

see What does sudo apt-get update do?

apt-get update downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies.