CentOS yum安装docker和docker-compose
docker
#清理环境
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
#安装工具
sudo yum install -y yum-utils
#使用阿里云源
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
#安装docker
sudo yum install -y docker-ce docker-ce-cli containerd.io
#启动docker & 设置开机启动
sudo systemctl start docker
sudo systemctl enable docker
docker version
docker-compose
#下载compose
sudo curl -L "https://github.com/docker/compose/releases/download/v2.24.6/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
#赋予执行权限
sudo chmod +x /usr/local/bin/docker-compose
#启动
docker-compose version
本文来自博客园,作者:HookDing,转载请注明原文链接:https://www.cnblogs.com/HookDing/p/18853118

浙公网安备 33010602011771号