Setup Docker CE for CentOS 7

Overview

In this tutorial I will show how to Setup Docker CE for CentOS 7.
The default Docker version that comes with CentOS is very old and only supports docker-compose syntax version 2. To use a higher level of docker-compose syntax we need the latest Docker CE.
This tutorial is the short version of the official Docker CE tutorial.

Setup Docker CE for CentOS 7

Remove old version

1
yum remove docker*

Install Docker CE Prerequisites

1
yum install -y yum-utils device-mapper-persistent-data lvm2

Add Docker CE Repository

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

Install Docker CE

1
yum install docker-ce docker-ce-cli containerd.io

Enable Docker CE to run on startup

1
systemctl enable docker

Start Docker CE

1
systemctl start docker

Test Docker CE

1
docker run hello-world

All Done

Leave a Reply

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

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.