2.4.3.2 Install or Reinstall the Docker

To install or reinstall the Docker if you have already uninstalled it as shown in the previous section, perform the following steps:

  1. Execute the following command in the command prompt to update the system:$ sudo yum update -y
  2. Execute the following command in the command prompt to update the yum repository:
    If the public-yum-ol7.repo file is available in the /etc/yum.repos.d directory, then open it in the Vi editor with the command sudo vi /etc/yum.repos.d/ public-yum-ol7.repo and enable the ol7_addons repository to install the latest Docker release (19.03.11.ol).
  3. Execute the following command in the command prompt to install Docker:$ sudo yum install docker-engine -y
  4. Execute the following command in the command prompt and start the Docker service:$ sudo service docker start
  5. Execute the following command in the command prompt and verify whether the Docker service is running:$ sudo docker run hello-worldAfter you verify that the service is running, the Docker installation is successful.
  6. Docker installation uses the following pre-configured ports which must be enabled in the server before installing the applications.
    • 9999
    • 6666
    • 6507
    • 6509
    • 6500
    • 6505
    • 6501
    • 10101
    • 7001
    • 7002
    • 7004
    • 7005
    • 7006
    • 7011
    • 5556
    • 8453