[TOC]linux
本文开发环境为Ubuntu 16.04 LTS 64位系统,经过apt的docker官方源安装最新的Docker CE(Community Edition),即Docker社区版,是开发人员和小型团队的理想选择。docker
$ sudo apt-get remove docker docker-engine docker-ce docker.io
$ sudo apt-get update
$ sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
$ sudo apt-get update
$ sudo apt-get install -y docker-ce
$ apt-cache madison docker-ce
$ sudo apt-get install docker-ce=<VERSION>
$ systemctl status docker
$ sudo systemctl start docker
$ sudo docker run hello-world
显示以下:ubuntu
Hello from Docker! This message shows that your installation appears to be working correctly.