先来份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