In the previous dispatch, I whined about Docker not being easily installable on RHEL Workstation. I also spent some time explaining the relationship between Fedora and RHEL.
The solution to my Docker problem comes from another interesting part of the Red Hat ecosystem: ‘rebuild’ distributions.
Just because Red Hat charges a bunch of money for RHEL licenses, it doesn’t stop being Free Software. All of the source code that makes up RHEL is available online. What stops anyone from using that code to compile and sell copies of RHEL? The surprising answer is “trademarks”. You are free to distribute an operating system built from the RHEL source code. You just can’t call it “Red Hat” or “RHEL”, or include any of their other trademarks.
So, several projects have sprung up to do that, most notably Scientific Linux and CentOS. These projects produce operating systems that are functionally identical to RHEL, but are available without licenses and subscriptions. One handy side effect of this, is that a package built for RHEL will work on these derivatives, and likewise, a package built for any of the RHEL-alikes will work just fine on RHEL.
Back to Docker. The CentOS folks have included Docker in their “extras” repository. I created a .repo file (stored in /etc/yum.repos.d) that instructs my system to include CentOS Extras when it searches for software.
[extras] name=CentOS-7 - Extras baseurl=http://mirror.centos.org/centos/7/extras/x86_64/ enabled=1 gpgcheck=1 gpgkey=http://mirror.centos.org/centos/7.1.1503/os/x86_64/RPM-GPG-KEY-CentOS-7 priority=1 includepkgs=docker* golang*
Then, it’s a simple matter of:
yum install docker docker-selinux # if you want to run docker using a non-root account: groupadd docker usermod -a -G docker <account name> # if you're logged into that account, log out and back in a again for the group change to become effective
Then you can docker all damn day.
updated 5/14 to include docker-selinux in the install instructions