Centos安装最新版Docker CE、Docker-Compose

卸载旧版Docker

$ rpm -qa | grep docker # 或者 yum list installed | grep docker 
docker-engine-1.13.0-1.el7.centos.x86_64
docker-engine-selinux-1.13.0-1.el7.centos.noarch
$ yum remove docker-engine-1.13.0-1.el7.centos.x86_64
$ yum remove docker-engine-selinux-1.13.0-1.el7.centos.noarch

安装最新版Docker

$ curl -fsSL https://get.docker.com/ | sh

# centos 7
$ systemctl restart docker # 启动服务
$ systemctl enable docker # 开机启动

# centos 6
$ service docker restart # 启动服务
$ chkconfig docker on # 开机启动

# 查看安Docker版本
$ docker version # docker -v
Client:
 Version:      18.05.0-ce
 API version:  1.37
 Go version:   go1.9.5
 Git commit:   f150324
 Built:        Wed May  9 22:14:54 2018
 OS/Arch:      linux/amd64
 Experimental: false
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.05.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.5
  Git commit:   f150324
  Built:        Wed May  9 22:18:36 2018
  OS/Arch:      linux/amd64
  Experimental: false

安装最新版Docker-Compose

https://github.com/docker/compose/releases
选择最新版本

$ curl -L https://github.com/docker/compose/releases/download/1.22.0-rc2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose

$ docker-compose -v
docker-compose version 1.22.0-rc2, build 6817b533

参考:
Docker CE
docker 升级到最新版
docker-compose最新版安装

You may also like...

发表评论

电子邮件地址不会被公开。 必填项已用*标注