Top

Docker-CE的安装

安装Docker-CE

我的环境是Centos7.4!3台服务器:Server

172.16.255.116-www1
↓简介
Docker从1.13.x版本开始,版本分为企业版EE和社区版CE,版本号也改为按照时间线来发布,比如17.03就是2017年3月.

↓原文出自

获得CentOS的Docker CE:https://docs.docker.com/install/linux/docker-ce/centos/#prerequisites

1. 删除原来的Docker软件.

[root@www1 ~]# yum remove docker \
                   docker-client \
                   docker-client-latest \
                   docker-common \
                   docker-latest \
                   docker-latest-logrotate \
                   docker-logrotate \
                   docker-engine

2. 安装依赖并设置存储库.

[root@www1 ~]# yum install -y yum-utils \
   device-mapper-persistent-data \
   lvm2
[root@www1 ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

3. 安装Docker-CE并启动.

[root@www1 ~]# yum install docker-ce docker-ce-cli containerd.io
[root@www1 ~]# systemctl start docker

4. 测试

[root@www1 ~]# docker version
Client:
 Version:           18.09.6
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        481bc77156
 Built:             Sat May  4 02:34:58 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.6
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       481bc77
  Built:            Sat May  4 02:02:43 2019
  OS/Arch:          linux/amd64
  Experimental:     false