Install Docker in CentOS 7

For those who want to build and run Docker-containers in CentOS-7 – first of all, it is necessary to install the Docker itself.

To install the latest version of Docker and be able to update it in the future without any problems – it is recommended to install Docker from the official repository.

Tip: Install Docker on Ubuntu 16.04 Xenial Xerus Read More →

In this tutorial, I’ll show you how to install a free Docker CE (Community Edition) in CentOS-7 from a stable official repository, how to make sure that it is installed correctly and that you usually need to do after installation.

Requirements: To install the Docker in CentOS 7 – you must have a 64-bit architecture and a Linux kernel version 3.10 or higher. Having executed archand uname -r, it is possible to check up whether the system corresponds to the given requirements.

Installing the Docker in CentOS-7

Configure a stable Docker repository:

Install the Docker:

Run the Docker:

Make sure that the Docker is installed correctly by running the image hello-world:

Tip: Docker has been successfully installed! It’s time to launch the first Docker-container! Read More →

Post-Installation Steps

After installing the Docker, you need to do a few more things.

First of all, you need to configure the automatic launch of the Docker daemon when the system boots.

Run the following command to add the Docker to startup:

And secondly, so that each time you dockerdo not type a command sudo, add your user to the group docker:

Information: To end the user’s binding to the group, log out and log back in.

To make sure that you can run dockerwithout sudo, run:

 

Authored By Imran Yousaf

I am Imran Yousaf, a computer geek, founder of the site Smashinglab.com. I am a die hard fond of open-source software and Linux operating system. In addition to Linux, I am interested in everything related to information technology and modern science.

Leave a Reply

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