Glimpse of Docker on RHEL 6.5

In this article I am going to give you the glimpse of docker on RHEL 6.5.

What is package require for docker to work ?
[root@Node1 ~]# rpm -qa | grep -i docker
docker-io-1.1.2-1.el6.x86_64

How to check the containers present on server ?

[root@Node1 ~]# docker ps
CONTAINER ID        IMAGE                        COMMAND                CREATED             STATUS              PORTS               NAMES
d56d999c57d7        newedge/php:latest         /bin/sh -c ‘/usr/sbi   39 hours ago        Up 39 hours         80/tcp              bobtest-0009
a68eefe8c623        newedge/php:latest         /bin/sh -c ‘/usr/sbi   39 hours ago        Up 39 hours         80/tcp              bobtest-000a
ccb79870cc00        newedge/php:latest         /bin/sh -c ‘/usr/sbi   39 hours ago        Up 39 hours         80/tcp              bobtest-0008
e33f88d8ba5e        newedge/php:latest         /bin/sh -c ‘/usr/sbi   39 hours ago        Up 39 hours         80/tcp              bobtest-0007
f8d95a56cd49        newedge/php:latest         /bin/sh -c ‘/usr/sbi   39 hours ago        Up 39 hours         80/tcp              bobtest-0005
a8638b084e1e        newedge/php:latest         /bin/sh -c ‘/usr/sbi   39 hours ago        Up 39 hours         80/tcp              bobtest-0006
ecb9405c3726        newedge/php:latest         /bin/sh -c ‘/usr/sbi   39 hours ago        Up 39 hours         80/tcp              bobtest-0004
824d680b8d89        newedge/php:latest         /bin/sh -c ‘/usr/sbi   39 hours ago        Up 39 hours         80/tcp              bobtest-0003
112ca55c81f8        newedge/php:latest         /bin/sh -c ‘/usr/sbi   39 hours ago        Up 39 hours         80/tcp              bobtest-0002
b4ce44ba885a        newedge/php:latest         /bin/sh -c ‘/usr/sbi   39 hours ago        Up 39 hours         80/tcp              bobtest-0001
269ff3ce3e84        newedge/memcached:latest   /usr/bin/memcached –   40 hours ago        Up 40 hours         11211/tcp           memcached

How to check the process running in docker ?

[root@Node1 ~]# docker top d56d999c57d7
UID                 PID                 PPID                C                   STIME               TTY                 TIME                CMD
root                6384                7025                0                   Oct08               ?                   00:00:07            /usr/sbin/httpd -k start -D FOREGROUND
apache              6472                6384                0                   Oct08               ?                   00:00:02            /usr/sbin/httpd -k start -D FOREGROUND
apache              6473                6384                0                   Oct08               ?                   00:00:02            /usr/sbin/httpd -k start -D FOREGROUND
apache              6474                6384                0                   Oct08               ?                   00:00:02            /usr/sbin/httpd -k start -D FOREGROUND
apache              6475                6384                0                   Oct08               ?                   00:00:02            /usr/sbin/httpd -k start -D FOREGROUND
apache              6476                6384                0                   Oct08               ?                   00:00:02            /usr/sbin/httpd -k start -D FOREGROUND
apache              6477                6384                0                   Oct08               ?                   00:00:02            /usr/sbin/httpd -k start -D FOREGROUND
apache              6478                6384                0                   Oct08               ?                   00:00:02            /usr/sbin/httpd -k start -D FOREGROUND
apache              6479                6384                0                   Oct08               ?                   00:00:02            /usr/sbin/httpd -k start -D FOREGROUND

How to check the version of docker ?

[root@Node1 ~]# docker version
Client version: 1.1.2
Client API version: 1.13
Go version (client): go1.2.2
Git commit (client): d84a070/1.1.2
Server version: 1.1.2
Server API version: 1.13
Go version (server): go1.2.2
Git commit (server): d84a070/1.1.2

How to check the container information ?

[root@Node1 ~]# docker info
Containers: 11
Images: 106
Storage Driver: devicemapper
Pool Name: docker-253:3-835603-pool
Data file: /var/lib/docker/devicemapper/devicemapper/data
Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 3881.9 Mb
Data Space Total: 102400.0 Mb
Metadata Space Used: 6.1 Mb
Metadata Space Total: 2048.0 Mb
Execution Driver: native-0.2
Kernel Version: 2.6.32-431.29.2.el6.x86_64

How to list the images ?

[root@Node1 ~]# docker images
REPOSITORY            TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu                13.10               195eb90b5349        3 months ago        184.6 MB
ubuntu                10.04               3db9c44f4520        5 months ago        183 MB
ubuntu                lucid               3db9c44f4520        5 months ago        183 MB

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s