Why not just:
sudo apt install docker.io
And for more up-to-date versions, why doesn't Docker create a ppa? At most it should be something of the sort of: sudo apt-add-repository ppa:docker/docker
sudo apt install docker
That's how these things were intended to work.