先來份Ubuntu 下安裝 docker 的官方文檔 -> Get Docker CE for Ubuntu
官方文檔的安裝方式是最靠譜的,可是對於國內的小夥伴來講牆是硬傷...linux
先來看看2個鏡像站:docker
https://mirrors.aliyun.com/
- 這是公網開放的,不在阿里雲內網的服務器能夠考慮使用這個http://mirrors.cloud.aliyuncs.com
- 這是僅供阿里雲內網使用的,好比阿里雲ECS服務器就能夠訪問,至關於局域網,速度會快不少不少,並且不算公網流量帶寬.下面見操做:以阿里雲ECS服務器 & Ubuntu 16.04 下安裝 Docker CE 爲例...shell
# 操做上同官方文檔是一致的,就是鏡像源替換成*阿里雲內網開源鏡像站*而已. # apt update # apt full-upgrade -y # apt install apt-transport-https ca-certificates curl software-properties-common -y # curl -fsSL http://mirrors.cloud.aliyuncs.com/docker-ce/linux/ubuntu/gpg | apt-key add - # add-apt-repository \ "deb [arch=amd64] http://mirrors.cloud.aliyuncs.com/docker-ce/linux/ubuntu \ $(lsb_release -cs) \ stable" # apt update # apt install docker-ce -y
搞定,開始你的docker-ce
之旅吧...ubuntu