The instructions point to adding their repository:
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
In elementary OS, lsb_release -cs will output hera, for which that repository does not contain anything.
But, as elementary OS is based on Ubuntu 18.04 Bionic, you can easily ...
Have you tried installing it with a downloaded .deb installer? It seems that the cli file is sometimes inaccessible due to lack of support for a particular OS.
Or have you tried using:
sudo apt install docker.io