CentOS 8.x下安装docker和docker-compose
安装依赖项
yum install -y yum-utils device-mapper-persistent-data lvm2
# 配置yum源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# 安装docker依赖项containerd.io
yum install -y containerd.io
安装docker-ce
yum install -y docker-ce docker-ce-cli
配置docker镜像站
mkdir /etc/docker
vim /etc/docker/daemon.json
输入以下内容:
{
"registry-mirrors":["https://3wzyb32e.mirror.aliyuncs.com"]}
Esc
,:wq