Skip to content

Instantly share code, notes, and snippets.

@judavi
Created April 7, 2019 10:09
Show Gist options
  • Save judavi/51e468b93c3714e06e6f851e807aa891 to your computer and use it in GitHub Desktop.
Save judavi/51e468b93c3714e06e6f851e807aa891 to your computer and use it in GitHub Desktop.
Install Docker-ce CentOS or RHEL

#Install Docker & Docker Compose - Centos 7

Step 1 — Install Docker Install needed packages:

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

Configure the docker-ce repo:

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

Install docker-ce:

$ sudo yum install docker-ce

Add your user to the docker group with the following command.

$ sudo usermod -aG docker $(whoami)

Set Docker to start automatically at boot time:

$ sudo systemctl enable docker.service

Finally, start the Docker service:

$ sudo systemctl start docker.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment