Installing ssh-keyscan on Alpine linux?
This would do the job:
RUN apk add --no-cache openssh-client \ && ssh-keyscan github.com > ~/.ssh/known_hosts
You can find the content of an Alpine linux package on this website:https://pkgs.alpinelinux.org/contents?branch=edge&name=openssh-client&arch=x86&repo=main
The command you're looking for is actually ssh-keyscan
and you can easily find it using pkgs.alpinelinux.org/contents.