Forum Navigation
You need to log in to create posts and topics.

Install Docker & Docker Compose – Centos 7

Overview

Docker – is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels

Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. Run dockercompose up and Compose starts and runs your entire app.

Docker installation steps:

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 Community Edition

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

 

Docker Compose installation steps:

Install Extra Packages repository  for Enterprise Linux

sudo yum install epel-release

Install python-pip

sudo yum install -y python-pip

install Docker Compose:

sudo pip install docker-compose

You will also need to upgrade your Python packages on CentOS 7 to get docker-compose to run successfully:

sudo yum upgrade python*

To verify a successful Docker Compose installation, run:

docker-compose version