Docker – First Step

First of all, we have to verify the version of our Operating System :

Prerequisite :

OS should be 64 bit

Linux kernel ver 3.10 or greater

Command to check :

uname -r


STEP 1 – Install & Start DOCKER

sudo yum -y update

sudo yum install -y docker
docker --version

Start DOCKER :

sudo service docker start


sudo service docker stop

We have also to add our current user, to have permission to use Docker

sudo usermod -a -G docker "user"

To run hello-world image :

docker run hello-world 

To get list of images present locally :

docker images 

To get list of running containers :

docker ps

To get list of all containers :

docker ps -a 


STEP 2 – Docker Basic Commands – Step by Step for Beginners

To have more informations about Docker version :

docker --version

docker -v

docker --info

docker --help

To download images on local repository of Docker (example : centos)

docker pull centos

To delete images on local repository of Docker (example : centos) 

docker rmi centos

To manage Containers :

docker ps

docker run

docker start

docker stop

To run ubuntu container and connect on it :

docker run -it ubuntu

To see statistics :

docker stats

docker system df

To delete all Docker platform :

docker system prune