1. 程式人生 > >安裝docker 17.03.2.ce教程

安裝docker 17.03.2.ce教程

系統

[[email protected] wayne]# cat /etc/redhat-release 
CentOS Linux release 7.5.1804 (Core) 

安裝步驟

安裝 yum-config-manager

yum -y install yum-utils

yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
    
yum makecache

檢視yum docker版本

[[email protected]
~]# yum list docker-ce.x86_64 --showduplicates |sort -r * updates: mirrors.neusoft.edu.cn Loading mirror speeds from cached hostfile Loaded plugins: fastestmirror * extras: mirrors.neusoft.edu.cn docker-ce.x86_64 3:18.09.0-3.el7 docker-ce-stable docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.3.ce-1.el7 docker-ce-stable docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable * base: mirrors.neusoft.edu.cn Available Packages

注意: 安裝指定版本 docker-ce 17.03 被 docker-ce-selinux 依賴, 不能直接yum 安裝 docker-ce-selinux

開始安裝

 wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm

yum install policycoreutils-python -y
 rpm -ivh docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
    
    yum -y install docker-ce-17.03.2.ce

啟動docker

[[email protected] ~]# systemctl start docker 
[[email protected] ~]# systemctl status docker 

檢視docker version

[[email protected] ~]# docker version 
Client:
 Version:      17.03.2-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   f5ec1e2
 Built:        Tue Jun 27 02:21:36 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.2-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   f5ec1e2
 Built:        Tue Jun 27 02:21:36 2017
 OS/Arch:      linux/amd64
 Experimental: false

安裝完畢