安装docker
先执行 yum update
docker 官网 查看文档 https://docs.docker.com/install/linux/docker-ce/centos/
设置docker 容器镜像加速器 阿里云提供
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://rom1rlze.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
安装 docker-compose
https://docs.docker.com/compose/install/#install-compose
选择 Alternative install options 使用pip 安装
为docker-compose 设置别名
https://blog.csdn.net/u013521296/article/details/77898908
vi ~/.bashrc 添加 alias dc='docker-compose'
source ~/.bashrc