Skip to content

Instantly share code, notes, and snippets.

@devops-school
Last active September 10, 2020 05:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devops-school/e6a09200d0c3ea9ea8a7905b598f08be to your computer and use it in GitHub Desktop.
Save devops-school/e6a09200d0c3ea9ea8a7905b598f08be to your computer and use it in GitHub Desktop.
How to install Docker Community Edition via YUM?

Command 1 - Install required packages. yum-utils provides the yum-config-manager utility, and device-mapper-persistent-data and lvm2 are required by the devicemapper storage driver.

$ sudo -s
$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2

Command 2 - Use the following command to set up the stable repository

$ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Command 3 - Install the latest version of Docker CE

$ sudo yum install –y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ sudo yum-config-manager --enable rhui-REGION-rhel-server-extras
$ sudo yum install -y docker-ce
$ sudo yum install docker-ce

Command 4 - Enable Docker

$ sudo systemctl enable docker

Command 5 - Start Docker and Verify Docker Installations

$ sudo systemctl start docker
$ docker -v
$ docker info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment