How to install Docker on Centos 7

As we all know, that times change a new technology is coming in. If in the past there was a bare-metal server that was updated to VPS services, then now VPS are updated or replaced with Docker. Since Docker, it is easy to maintain and the applications are limitless. So in this tutorial, we will show you how you can install Docker and Docker Compose. Now keep in mind that you can also install this on our Amber IT VPS servers since we don't limit any possibility and allow you to use the VPS for Docker hosting.

  1. Install Docker
yum install -y yum-utils device-mapper-persistent-data lvm2

1.1 Configure the docker-ce repo:

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

1.2. Install docker-ce:

yum -y install docker-ce

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

sudo usermod -aG docker $(whoami)

1.4. Set Docker to start automatically at boot time:

systemctl enable docker.service

1.5. Finally, start the Docker service:

sudo systemctl start docker.service

2. Step 2 — Install Docker Compose

2.1. Install Extra Packages for Enterprise Linux:

yum -y install epel-release

 

2.2. Install python-pip:

yum install -y python-pip

2.3. Then install Docker Compose:

 pip install -y docker-compose

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

yum -y upgrade python*

2.5. To verify a successful Docker Compose installation, run:

docker-compose version

Warning: file_get_contents(http://api.wipmania.com/34.239.177.24?[YOUR SITE URL]): failed to open stream: Connection refused in /var/www/vhosts/amberit.eu/httpdocs/wp-content/themes/amberit/inc/layout-functions.php on line 821