docker安裝——ubuntu系統

首先提權到root

su -

 

查看內核版本(內核版本要大於3.10

#uname -r

3.13.0-32-generic

 

 

更新軟件包的信息,確保HTTPSCA證書安裝和工作

#  apt-get update

#  apt-get install apt-transport-https ca-certificates

 

 

增加GPGkey

 apt-key adv \

               --keyserver hkp://ha.pool.sks-keyservers.net:80 \

               --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

 

增加docker

Precise 12.04 (LTS)  deb https://apt.dockerproject.org/repo ubuntu-precise main

Trusty 14.04 (LTS)  deb https://apt.dockerproject.org/repo ubuntu-trusty main

Wily 15.10  deb https://apt.dockerproject.org/repo ubuntu-wily main

Xenial 16.04 (LTS)  deb https://apt.dockerproject.org/repo ubuntu-xenial main

 

 

echo "deb https://apt.dockerproject.org/repo ubuntu-trusty mai" | tee /etc/apt/sources.list.d/docker.list

 

 

更新apt包索引

apt-get update

 

 

 

安裝推薦的軟件包(14.04以上)

 apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

 

如果是12.04或以下必須先更新內核並重啓

 apt-get install linux-image-generic-lts-trusty

 

 reboot

 

 

安裝docker

apt-get install docker-engine


將用戶添加到用戶組
sudo gpasswd -a ${USER} docker 


配置本地源

curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://e36cbad3.m.daocloud.io


啓動docker守護進程

service docker start

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章