1、我直接使用安裝命令安裝
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
但是遇到如下報錯資訊
# Executing docker install script, commit: 3d8fe77c2c46c5b7571f94b42793905e5b3e42e4
+ sh -c 'yum install -y -q yum-utils'
+ sh -c 'yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo'
Adding repo from: https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
+ '[' stable '!=' stable ']'
+ sh -c 'yum makecache'
CentOS-8 - AppStream 947 B/s | 4.3 kB 00:04
CentOS-8 - Base 3.7 kB/s | 3.9 kB 00:01
CentOS-8 - Extras 61 B/s | 1.5 kB 00:25
Docker CE Stable - x86_64 1.2 kB/s | 9.2 kB 00:07
Metadata cache created.
+ '[' -n '' ']'
+ sh -c 'yum install -y -q docker-ce'
Error:
Problem: problem with installed package podman-1.6.4-10.module_el8.2.0+305+5e198a41.x86_64
- package podman-1.6.4-10.module_el8.2.0+305+5e198a41.x86_64 requires runc >= 1.0.0-57, but none of the providers can be installed
- package podman-2.0.5-5.module_el8.3.0+512+b3b58dca.x86_64 requires runc >= 1.0.0-57, but none of the providers can be installed
- package containerd.io-1.4.3-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-65.rc10.module_el8.2.0+305+5e198a41.x86_64
- package containerd.io-1.4.3-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-65.rc10.module_el8.2.0+305+5e198a41.x86_64
- package containerd.io-1.4.3-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
- package containerd.io-1.4.3-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-68.rc92.module_el8.3.0+475+c50ce30b.x86_64
- package docker-ce-3:20.10.3-3.el8.x86_64 requires containerd.io >= 1.4.1, but none of the providers can be installed
- cannot install the best candidate for the job
- package runc-1.0.0-64.rc10.module_el8.3.0+479+69e2ae26.x86_64 is filtered out by modular filtering
這是因為CentOS 8中默認安澤了podman,與Docker沖突,
2、輸入如下命令繼續安裝
yum install --allowerasing docker-ce
安裝程序中,我們可以看到

其中,自動卸載了podman,直到出現Complete!完成安裝~~~~
3、啟動docker
systemctl start docker
4、查看docker狀態
systemctl status docker

正在運行,
5、設定docker開機自動啟動
systemctl enable docker.service
成功后,我們可以重啟linux,輸入reboot,啟動成功后,發現docker仍是運行狀態,
OK!安裝成功!
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/256881.html
標籤:其他
上一篇:2020 年 AIoT 產業概述
下一篇:簡易的合成大西瓜魔改教程
