In this tutorial, we will learn how to install and run Docker CE on CentOS 8.1 using the official Docker repository.
What is Docker?
Docker is an open source project that allows applications to be created and distributed inside containers, which are standardized environments that can be easily replicated independently of the host system.
Add Docker repository
First, we must add an external repository to get Docker CE. We will use the official Docker CE CentOS repository.
installation steps:
1. Download the docker-ce repo
2. Installation dependencies (this is a key step compared to CentOS 7)
Transaction Summary
================================================ ================================
Install 1 package
Total: 21 M
Are you sure? [y / N]: y
3. Install docker-ce
Transaction Summary
================================================ ================================
Install 3 packages
Total download: 64 M
Installation size: 273 M
Are you sure? [y / N]: y
4. Start docker
We can check whether the service is running normally with the following command:
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor pre>
Active: active (running) since Sun 2020-04-19 05:28:15 EDT; 8min ago
Docs: https://docs.docker.com
Main PID: 60217 (dockerd)
Tasks: 15
Memory: 195.9M
CGroup: /system.slice/docker.service
├─60217 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/conta>
└─60528 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port>
At this point, Docker is only successfully installed, and other functions are yet to be tested.