[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.