Dockers Installation and Commands for centos7

As per wiki:
Docker is an opensource project that automates the deployment of applications inside software containers,by providing an additional layer of abstraction and automation of operating system-level virtualization on linux.

Does it runs only on Linux??
The Docker daemon uses Linux-specific kernel features, you can’t run Docker natively in Windows. Instead, you must use docker-machine to create and
attach to a Docker VM on your machine. This VM hosts Docker for you on your Windows system.The Docker VM is lightweight Linux virtual machine made specifically to run the Docker daemon on Windows. The VirtualBox VM runs completely from RAM, is a small ~24MB download, and boots in approximately 5s.

Dockers Installation:
In this section we will be installing dockers on centos 7.

– Install epel pakage , for epel repository.
yum install epel-release
 – Update the packages
 yum update
– Install the docker pakcage, Incase of centos its “docker-io”
yum install docker-io
-Start and configure the service
service docker start
ps aux |grep docker
chkconfig docker on

-Check Docker Version

docker version
<command output>
Client version: 1.7.1
Client API version: 1.19
Package Version (client): docker-1.7.1-108.el7.centos.x86_64
Go version (client): go1.4.2
Git commit (client): 3043001/1.7.1
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Package Version (server): docker-1.7.1-108.el7.centos.x86_64
Go version (server): go1.4.2
Git commit (server): 3043001/1.7.1
OS/Arch (server): linux/amd64

docker info
#Below is command output
Containers: 0
Images: 0
Storage Driver: devicemapper
 Pool Name: docker-202:1-75739270-pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 307.2 MB
 Data Space Total: 107.4 GB
 Data Space Available: 16.05 GB
 Metadata Space Used: 729.1 kB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.147 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.93-RHEL7 (2015-01-28)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.10.0-229.11.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
CPUs: 1
Total Memory: 992.1 MiB

– Pull ubuntu image using docker command line:
docker pull ubuntu:latest

<output>latest: Pulling from
d3a1f33e8a5a: Pull complete
c22013c84729: Pull complete
d74508fb6632: Pull complete
91e54dfb1179: Pull complete The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:73fbe2308f5f5cb6e343425831b8ab44f10bbd77070ecdfbe4081daa4dbe3ed1
Status: Downloaded newer image for

-List the Docker images

docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE    latest              91e54dfb1179        3 weeks ago         188.3 MB

-Run the container image

docker run -i -t  ubuntu /bin/bash
root@a165ac32dec0:/# uname -a
Linux a165ac32dec0 3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
root@a1d068a9c409:/# ps aux
root         1  0.2  0.1  18164  1880 ?        Ss   04:58   0:00 /bin/bash
root        15  0.0  0.1  15564  1144 ?        R+   04:58   0:00 ps aux

In next segment we will see some advance level of command !!

Working as an Architect, Infra designer. If any query related to Infra Design [related to cloud,vmware,openstack], please write: