图省事一般采用第一种
一、 直接采用apt安装
apt install docker.io
查看 /usr/lib/systemd/system/docker.service
ubuntu默认守护进程用的:fd://
ps -ef | grep docker
root 775237 1 0 11:14 ? 00:01:07 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
对比CentOS
centos默认守护进程用 :unix
ps -ef | grep docker
root 7703 1 0 10:14 ? 00:00:02 /usr/bin/dockerd -H unix:///var/run/docker.sock
二、 采用阿里云镜像
1、安装
使用官方安装脚本自动安装
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
版本:20.10.7
2、镜像加速器
- 科大镜像:https://docker.mirrors.ustc.edu.cn/
- 网