CentOS安装Docker

2022-04-08  本文已影响0人  XiaoMaPro

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
上一篇下一篇

猜你喜欢

热点阅读