Installing Docker Standard Edition over linux

Before enabling any repositories , we should be sure that we have installed the necessary required packages to support Docker.

  • yum install -y yum-utils device-mapper-persistent-data lvm2

image2.png

 

Next using appropriate command add the docker CE repository also update the local yum cache once added

image2.png

Next use the appropriate command to install Docker CE application from the new-configured repository.

  • sudo yum install docker-ce

image3

  • Once Docker installed properly it should show below message

image4

  • Using the appropriate service management commands we need to enable Docker CE service so that it gets starts by itself while the service reboots and then start the Dokcer CE service.
    Command:- systemctl enable docker && systemctl start docker && systemctl status docker

image6.png

  • Command to start docker service:-  systemctl start docker
  • Command to stop docker service:-  systemctl stop docker
  • Command to status docker service:-  systemctl status docker
  • To test the docker service we can pull a dummy image can use below command to pull and image
    command:- docker pull httpd

image7.png

  • As we have pulled the httpd image so if we execute the command docker images it should show the image name
    Command:- docker images

     image8.png

how-to-install-docker-in-linux-729727