一、設置倉庫 1.更新apt包索引 apt-get update apt-get update 2.安裝軟體包,使它允許apt通過HTTPS使用倉庫 apt-get install apt-transport-https ca-certificates curl software-propertie ...
一、設置倉庫
1.更新apt包索引
- apt-get update
2.安裝軟體包,使它允許apt通過HTTPS使用倉庫
- apt-get install apt-transport-https ca-certificates curl software-properties-common
3.添加Docker的官方GPG密鑰
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- 通過搜索密鑰的最後8個字元,確認您現在已經擁有指紋 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 的密鑰
4.使用以下命令來設置 stable 的倉庫。即使你想從 _edge _ 或 test 倉庫安裝構建,也總是需要 stable 的倉庫。要添加 _edge _ 或 test 倉庫,請在下麵的命令中在單詞stable之後添加edge或test(或兩者)
- 這裡我選擇添加test
二、安裝docker ce
1.更新apt包索引
- apt-get update
2.安裝最新版本有 Dcoker CE
- apt-get install docker-ce
3.通過運行hello-world 鏡像驗證Docker CE是否正確安裝
- docker run hello-world