Docker is an open platform that has been explained on the part of Docker Overview as an introduction of what is Docker and also why do we use Docker. I assumed that the reader has understood about basic overview of Docker. This pages will explain how to Install Docker on Your Virtual Machine. Since the containers are light and they do not need the extra load of a hypervisor because you can run more containers than if you were running virtual machines on a particular hardware combination.


The prerequisites before installing Docker on my own computer are,
1. Operating System: macOS Catalina, 16GB, 2GHz Quad-Core Intel Core i5
2. VMware Fusion is used for my Virtual Machine
3. CentOS as the open virtualization format
4. A sudo privileges for user account
5. Terminal Access and software package installer yum – this is enabled by default, but if yours has been disabled you’ll need to re-enable it

Manage Super User

First, Root Password

The first step is opened the terminal and type,

  • sudo passwd root

  • # sudo means the command in Linux Command Line

    If you have root access, then sudo will execute commands as the Super User

    I run all the command docker at the Super User, after you set the password, for username you can type su and your password (my root password is root) that you have been set.

Second, Manage Network Service

Before install Docker make sure that your Virtual Machine has the internet, to make sure run the command:

  • ifconfig

    systemctl start NetworkManager

    systemctl enable NetworkManager

    systemctl status docker


  • # ifconfig means to see the IP Address
    # start means to start the network
    # enable means to start the network automatically when we close the system
    # status means to check the status of the network
    # ping means to make sure that you can connect to outside network

Installation Docker on centOS-7 with yum command

Step 1 : Updating Database Docker Package

The first step is opened the terminal and type,

  • sudo yum check-update

  • type (Y) to allow for completing the process

Step 2 : Dependencies Installation

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

  • # -y means yes

    # yum-utils means switch adds the yum-config-manager

    # device-mapper-persistent-data and lvm2 means the requiring package run quickly

Step 3 : Add the Docker Repository to CentOS

We need to add the Docker CE stable repository to the system to install the edge or test versions of Docker. Then, run the command:

  • sudo yum-config-manager --add-repo

Step 4: Install Docker On CentOS Using Yum

When you have done to prepare all the pre-installing, finally you can install and run the command:

  • yum install docker

    docker --version

  • # docker --version means to check docker has been install and also the version

Step 5: Manage Docker Service

  • systemctl start docker

    systemctl enable docker

    systemctl status docker