Ubuntu
直接安装
Ubuntu14.04版本及以上已经自带了Docker包,可以直接安装
$ sudo apt-get update
$ sudo apt-get install -y docker.io
$ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker
$ sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io
通过Docker源安装最新版本
$ sudo apt-get install apt-transport-https
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
$ sudo bash -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
$ sudo apt-get update
$ sudo apt-get install lxc-docker
Centos
Centos6.5+
$sudo yum installhttp://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm$sudo yum install docker-io
Centos7
$ sudo yum install docker
网友评论