到目前為止,如果使用Centos7安裝Docker記得images使用cnetos6的版本會比較好一點,光卡在systemctl上就能卡很久了,待續.
1.1首先要安裝上EPEL後才能安裝Docker,所以6以後的版本就不建議玩Docker了.
sudo wget http://download.fedoraproject.org/pub/epel/4/x86_64/epel-release-4-10.noarch.rpm
1.2下載完RPM檔後,就安裝了.
sudo rpm -ivh epel-release-4-10.noarch.rpm
1.3安裝完RPM檔後一定要更新.
sudo yum repolist
1.4接著移除Centos6上的docker(這步必要不管是剛剛裝完OS,或是舊有版本安裝docker).
sudo yum -y remove docker
1.5安裝Docker.
sudo yum install docker-io
1.6啟動Docker服務.
sudo service docker start
1.7設定Docker服務常駐.
sudo chkconfig docker on
Docker官方安裝參考連結 https://docs.docker.com/installation/centos/
2.Centos7安裝步驟
2.1安裝Docker.
sudo yum -y install docker docker-registry
2.2常駐Docker服務.
sudo systemctl enable docker.service
2.3啟動Docker.
sudo systemctl start docker.service
Centos7三步驟就收工,當然記得安裝完後確認一下Docker的版本.
sudo docker version
如果想玩目前最新支援ipv6的1.5版,記得更新.
sudo systemctl stop docker
sudo wget https://get.docker.com/builds/Linux/x86_64/docker-latest -O /usr/bin/docker
sudo systemctl start docker