docker的安装方法
由于docker要求centos内核不低于3.8,本博客中所有docker的安装都是基于centos7方法一:添加docker的yum源
#vim /etc/yum.repos.d/docker.repo
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg 安装docker:
#yum install docker-engine
设置开机启动:
#systemctl enable docker.service
启动docker:
#systemctl start docker
测试docker:
#docker run --rm hello-world
方法二:用阿里云的安装脚本
curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh - 方法三:用rancher的安装脚本
http://docs.rancher.com/rancher/v1.6/en/hosts/#supported-docker-versions
打开上面连接,选择对应的安装脚本
1.10:curl https://releases.rancher.com/install-docker/1.10.sh | sh
1.11:curl https://releases.rancher.com/install-docker/1.11.sh | sh
1.12.3(或更高):curl https://releases.rancher.com/install-docker/1.12.sh | sh
1.13:curl https://releases.rancher.com/install-docker/1.13.sh | sh
17.03.x-ce:curl https://releases.rancher.com/install-docker/17.03.sh | sh
页:
[1]