Introduction
Docker is a popular software package that creates and manages containers for application development.
The platform creates a uniform interface so that almost any application running on it is compatible with most operating systems. Developing in Docker also speeds up applications, since it shares the kernel and other Linux resources.
This is a guide on how to install Docker on CentOS 7.
Prerequisites
- A maintained/supported version of CentOS (Docker doesn’t test or support outdated versions)
- A user account with sudo privileges
- Terminal access (Right-click desktop, click Open in Terminal)
- CentOS Extras repository – this is enabled by default, but if yours has been disabled you’ll need to re-enable it
- Software package installer yum
Installing Docker on CentOS 7 With Yum
Installing from Docker repositories using the yum command is the easiest and most popular method.
Step 1: Update Docker Package Database
In a terminal window, type:
sudo yum check-update
Allow the operation to complete.
Step 2: Install the Dependencies
The next step is to download the dependencies required for installing Docker.
Type in the following command:
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
The –y
switch indicates to the yum installer to answer “yes” to any prompts that may come up. The yum-utils
switch adds the yum-config-manager. Docker uses a device mapper storage driver, and the device-mapper-persistent-data
and lvm2
packages are required for it to run correctly.
Add Comment