A Brief Introduction to Docker

Introduction

Application stacks are continually getting more complicated and have always been a challenge to deploy without problems. Docker specializes in containers, which make the process easier for developers to rapidly deploy and manage applications.

Docker containers use shared operating systems. Instead of virtualizing hardware, containers use one single Linux install. This in turn means that they are much more efficient than Virtual Machines as they use less resources. The Docker program itself is an extension of libcontainer and LXC, which means it has its own file system, RAM, CPU, and storage.


Benefits

Docker has many benefits and here are but a few:

1. Local development environments can be set up that are exact replicas of a live environment/server.

2. It simplifies collaboration by allowing anyone to work on the same project with the same settings, irrespective of the local host environment.

3. Multiple development environments can be run from the same host each one having different configurations, operating systems, and software.

4. Projects can be tested on different servers.

4. It gives you instant application portability. Build, ship, and run any application as a portable, LXC container that can run almost anywhere.


Conclusion

There is no doubt if that popularity of Docker. it has been downloaded 300 million times. You can give it a try here, or follow our tutorial on installing on Centos.


Installing Docker on Centos

Centos 7

Docker is included by default in the CentOS-Extras repository. To install run the following command:

sudo yum install docker

 

CentOS-6.5

For Centos 6, you need to ensure you have the EPEL repository enabled. You may also need to remove docker-io as there is package name conflict with a system tray application and its executable.

sudo yum -y remove docker
sudo yum install docker-io

 

To start the Docker service:

sudo service docker start

 

To run Docker on startup:

sudo chkconfig docker on

 

To verify that Docker is working,  pull the latest Centos image:

sudo docker pull centos

sudo docker images centos

 

To test the image run a simple bash script:

sudo docker run -i -t centos /bin/bash

 

Thats it! To get started check out the huge library of Docker files here.



Share this post


Comments