CentOS 8.1 install Docker

In this tutorial, we will learn how to install and run Docker CE on CentOS 8.1 using the official Docker repository.

CentOS 8.1 install Docker

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

CentOS 8.1 install Docker

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

CentOS 8.1 install Docker

3. Install docker-ce

Transaction Summary
================================================ ================================
Install 3 packages

Total download: 64 M
Installation size: 273 M
Are you sure? [y / N]: y

CentOS 8.1 install Docker

4. Start docker

CentOS 8.1 install 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>

CentOS 8.1 install Docker

At this point, Docker is only successfully installed, and other functions are yet to be tested.

Guess you like

Origin www.linuxidc.com/Linux/2020-04/162958.htm