So I have been playing Docker on Ubuntu for about 6 weeks and fell in love with the technology and the potential it has to simplify some deployment environments I have for some clients running at both Amazon and Rackspace. It has not been until this week that I have been able to test this technology with some of my corporate clients that are running private clouds because they are using RHEL/CentOS that used to require a special kernel that would break their SLA with RedHat if we went down this path.
So today I am happy to provide directions on running Docker 0.7 with RHEL/CentOS 6.5. Run all of these commands as root or sudo.
- Download the CentOS 6.5 Minimal Release
- Install CentOS 6.5 with all of the defaults
- Install the EPEL Repository
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
- Install Docker from RPM
yum install docker-io wget
- Start Docker
- Let’s create a new base filesystem
- Install some dependencies
yum install perl rpm rpm2cpio perl-libwww-perl
- Install rinse
wget http://www.steve.org.uk/Software/rinse/rinse-2.0.1.tar.gz tar xvfz rinse-2.0.1.tar.gz cd rinse-2.0.1 make install
- Now let’s create our first base filesystem. Grab this script from GitHub.
- Make this script executable
chmod 775 mkimage-rinse.sh
- Execute the script
./mkimage-rinse.sh leefaus/centos centos-6
- Now we can run docker
docker run leefaus/centos:6.5 cat /etc/hosts
That’s all there is to it. Check out Docker‘s website for more documentation.