Centos 7 Install Docker and Common Commands

CentOS 7 install Docker and common commands Introduction:

yum install Docker #install docker

systemctl start docker.service #start docker

systemctl enable docker.service #docker start on boot

docker -v #View docker version

docker info #View docker specific information

docker pull centos #Download centos image

docker images #Show existing image docker

rmi imageid #delete image

sudo usermod -a -G docker wisely #non-root users use

docker run -i -t centos /bin/bash #start the system


docker stop $(docker ps -a -q) #stop all containers

ps -a -q) #delete all Containers

docker rmi $(docker images -q) #delete all images

docker inspect container_name #View container information

docker inspect container_name | grep IPAddress #View the current container ip address

docker attach --sig-proxy=false 304 f5db405ec (press control +c to exit without stopping the container)