You would need to install ssh first.
RUN apt-get -yq update && \
apt-get -yqq install ssh
Then, the various ssh commands, including ssh-keyscan, would be available.
That is what I did in my sshd image Dockerfile.
I used it to add localhost to my .ssh/known_hosts in order to make some test locally on the sshd server.
As commented below by pjotr-dolphin:
If you are only after
ssh-keyscan,openssh-clienthas smaller footprint than ssh package.
Actually, package openssh-clients for RedHat/CentOS, as commented by Oleg Neumyvakin