目录
一.dockers的安装
1.更新apt
包的索引
sudo apt-get update
2.Docker仓库加进到apt里
反斜杠\代表一行,只是换行写更清晰:
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
3.添加Docker的官方GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
验证当前你所拥有的key的指纹是9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88,方法是搜索指纹中的后八个字符。
sudo apt-key fingerprint 0EBFCD88
建立稳定的仓库:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
4.docker安装
sudo apt-get update #更新安装源
sudo apt-get install docker-ce #安装最新版本docker-ce
安装指定版本的dockers-ce
列出可用版本
apt-cache madison docker-ce
sudo apt-get install docker-ce=18.06.3~ce