Setting up Docker 1.12 on CentOS 7

Docker is pretty much the de facto standard for running containers on Linux.
As of this writing, the latest stable version of Docker is 17.06. But some other platforms like Kubernetes which use Docker as the underlying container layer still work with older versions like 1.12. Official documentation for working with this version is now hard to find on the Docker site, as are easy ways of installing with yum. Hence the need for this guide.