2014-08-19

Test RHEL7 without installing it - on Docker!

So there's this new interesting operating system you'd like to try out? Traditionally you had to find a spare laptop where to install it on, and later on you installed them on virtual machines running on your laptop.

Nowadays things are even more easy; Docker provides an easy way to create software containers without you having to provision virtual machines or having to hunt for spare laptops.

Currently I'm running Fedora 20 on my laptop and in order to demonstrate stuff on RHEL7 all I need to do is to launch a RHEL7 in a container using Docker.

Couple of easy steps to test it out yourself:

Install Docker
On Fedora the RPM package is called "docker-io", let's install it first:

yum install docker-io

Add yourself to the Docker group so you don't need to use sudo later on:

So what just happened? We told Docker to run "rhel7" image and start "/bin/bash". Option -t allocates a pseudo-tty (terminal) and -i is interactive mode. If you forget the flags your image is started in background.

You can use docker ps command to list running images, common use case is to open another terminal to do this while your image is running: