CENTOS8.0安装DOCKER&DOCKER-COMPOSE

CENTOS8.0安装DOCKER&DOCKER-COMPOSE

1.更新yum

yum update

 

2.下载docker-ce的repo

curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo

 

3. 安装依赖(这是相比centos7的关键步骤)此过程可能需要一路输入 y

yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm

 

4.安装docker-ce

yum install docker-ce

 

5.启动docker

systemctl start docker

 

6.开机启动docker

	systemctl enable docker

 

7.安装docker-compose

sudo wget https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m) -O /usr/local/bin/docker-compose

 

8.添加操作权限

sudo chmod +x /usr/local/bin/docker-compose

 

9.设置快捷

sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

 

10.查看docker-compose 版本

docker-compose --version

你可能感兴趣的:(centos,linux,docker)