安装docker
bash
yum install -y yum-utils
yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fase
yum install -y docker-ce docker-ce-cli containerd.io
systemctl start docker
systemctl enable docker
docker version
docker run hello-world
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://kskdqwg1.mirror.aliyuncs.com"]
}
EOF
systemctl daemon-reload
systemctl restart docker
安装docker-compose
下载资源
bash
mv docker-compose-linux-x86_64 docker-compose
mv docker-compose /usr/local/bin/
chmod +x /usr/local/bin/docker-compose
docker-compose version