For all docker versions we have direct download links.
Like on our repository or on docker hub :
However, there is no direct link to download the installable (non docker) versions.
I propose you these two scripts to solve this need, the first one is with the wget command, the other one in curl.