本文出自http://www.cnblogs.com/scoter2008 1、強大的官方文檔 2、按步驟來,先更新yum源,這裡用163的源 3、更新系統 4、如果遇到問題:Delta RPMs disabled because /usr/bin/applydeltarpm not install ...
本文出自http://www.cnblogs.com/scoter2008
1、強大的官方文檔
https://docs.docker.com/engine/installation/linux/centos/
2、按步驟來,先更新yum源,這裡用163的源
yum install -y wget cd /etc/yum.repos.d wget http://mirrors.163.com/.help/CentOS7-Base-163.repo /usr/bin/yum clean all /usr/bin/yum makecache 其他系統自帶的源可以保留,也可以全部幹掉
3、更新系統
yum update
4、如果遇到問題:Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
yum install -y deltarpm
5、編輯生成docker的yum源文件
tee /etc/yum.repos.d/docker.repo <<-'EOF' [dockerrepo] name=Docker Repository baseurl=https://yum.dockerproject.org/repo/main/centos/7/ enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg EOF
6、安裝Docker
yum install docker-engine
7、如果遇到問題:Public key for docker-engine-selinux-1.10.1-1.el7.centos.noarch.rpm is not installed,執行下麵的命令
rpm --import https://yum.dockerproject.org/gpg
8、Docker下載速度很慢,請耐心等待
9、安裝完成後設置開機自啟
systemctl enable docker.service
10、啟動docker守護進程
systemctl start docker
11、查看docker版本
[root@localhost ~]# docker version Client: Version: 1.12.3 API version: 1.24 Go version: go1.6.3 Git commit: 6b644ec Built: OS/Arch: linux/amd64 Server: Version: 1.12.3 API version: 1.24 Go version: go1.6.3 Git commit: 6b644ec Built: OS/Arch: linux/amd64
12、 Done,enjoy it!