1 设置存储库
- 更新apt包索引:
sudo apt-get update
- 使用apt-get通过HTTPS使用存储库:
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
- 添加Docker的官方GPG密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- 通过搜索指纹的最后8个字符,验证您现在拥有带指纹的密钥 。
sudo apt-key fingerprint 0EBFCD88
会打印以下内容:
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) docker@docker.com
sub rsa4096 2017-02-22 [S]
- 使用以下命令设置稳定存储库。