美文网首页
CentOS安装Docker

CentOS安装Docker

作者: XiaoMaPro | 来源:发表于2022-04-08 20:22 被阅读0次

CentOS安装Docker

设置稳定版仓库

 # 设置仓库
 sudo yum-config-manager   --add-repo  https://download.docker.com/linux/centos/docker-ce.repo
 

安装

 sudo yum install docker-ce -y

启动docker

sudo systemctl start docker

安装docker-compose

sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

检查版本号

docker-compose -v

设置开机自启

systemctl enable docker.service

相关文章

网友评论

      本文标题:CentOS安装Docker

      本文链接:https://www.haomeiwen.com/subject/spqesrtx.html