docker installation
1. Remove the old docker installation package
apt-get remove docker docker-engine docker-ce docker.io
2. Update Package Index
apt-get update
3. The following packages are apt to be used so that the repository (Repository) over HTTPS
apt-get install -y apt-transport-https ca-certificates curl
software-properties-common
4. Add Docker official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
5. Set stable repository
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
6. Update the index look apt package
apt-get update
7. Install the latest version of Docker CE
apt-get install -y docker-ce
8. List of available versions
# 选择要安装的特定版本,第二列是版本字符串,第三列是存储库名称,它指示包来自哪个存储库,以及扩展它的稳定性级别。要安装一个特定的版本,将版本字符串附加到包名中,并通过等号(=)分隔它们:
apt-cache madison docker-ce
9. The specific version Installation
sudo apt-get install docker-ce=<VERSION>
10. The successful installation, see the corresponding version number
docker version
docker-compose mounting
2. Download the latest version
curl -L https://github.com/docker/compose/releases/download/1.25.0-rc3/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
3. Set permissions
sudo chmod +x /usr/local/bin/docker-compose
4. Check whether the installation is successful
docker-compose --version