The Debian 10 lxc container I was using didn't have ping installed. Weird.

To install it, you can install package iputils-ping with the command:

apt install iputils-ping