Docker installation on CentOS 6

Docker is a new container technology and an open platform for developers and sysadmins to build, ship, and run distributed applications. “Containers” are encapsulated, lightweight, and portable application modules. Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments.

Basically Docker allows the isolation of processes and their resources without the need of emulating machine hardware and operating system.

  • Dependency requirements of each application are segregated and are individually managed without any conflicts.
  • Simplifies configuration management by putting the dependency management straight into the hands of the developers.
  • The image used in production can also be used in development, which improves consistencies and reduces the amount of times developers say “But it worked on my PC” during the life-cycle of the project.


Docker installation


Docker installation on CentOS 6

Use the below steps to install docker on centos 6

Update EPEL Repository

Docker is part of Extra Packages for Enterprise Linux (EPEL), which is a community repository of non-standard packages for the RHEL distribution.

rpm -iUvh

Update packages

#yum update -y

install Docker by installing the docker-io package

#yum -y install docker-io

Once the installation completes, start the docker service

#service docker start

#chkconfig docker on
Thats all.. Docker has been installed successfully. You can view command line options.

#docker help


Download docker images

#docker pull centos

This will download centos docker image from docker repository.

Once download completed, check your docker images using this command

#docker images

Create docker container from your centos images
#docker run –name newdocker1 -d centos
log within your container.

#docker exec -it centos bash