Below you will find the commands to install docker on CentOS. For you convenience, you can simply copy and paste the commands.

Relevant Documentation
  • Install required packages:
    • sudo yum install -y device-mapper-persistent-data lvm2
  • Add the Docker CE repo:
    • sudo yum-config-manager \
      –add-repo \
  • Install the Docker CE packages and
    • sudo yum install -y docker-ce-18.09.5 docker-ce-cli-18.09.5
  • Start and enable the Docker service:
    • sudo systemctl start docker
      sudo systemctl enable docker
  • Add cloud_user to the docker group, giving the user permission to run docker commands:
    • sudo usermod -a -G docker cloud_user
  • Log out and back in.
  • Test the installation by running a simple container:
    • docker run hello-world

Leave a Reply

Your email address will not be published. Required fields are marked *