How to install Docker and Docker Compose

In this guide I use my previous Ceph cluster to show how to install Docker and Docker Compose.

Let’s begin.
1. Install yum-utils.
yum install -y yum-utils
2. Install Docker repository.
yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo

3. Install Docker.
yum -y install docker-ce docker-ce-cli containerd.io
4. Start Docker
systemctl start docker
then check docker service status
systemctl status docker
and start docker service after boot.
systemctl enable docker

5. Install Docker Compose
curl -L “https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)” -o /usr/local/bin/docker-compose
then make Docker Compose executable
chmod +x /usr/local/bin/docker-compose
and verify installed Docker and Docker Compose.
docker –version; docker-compose –version

6. Docker and Docker Compose is ready to use.

Ade Destrianto
Just tryna git gud.

Leave a Reply

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