在Ubuntu18.04上安裝Docker CE的方法(社區(qū)版)
卸載舊版本
如果之前安裝舊版本,需要先卸載:
$ sudo apt-get remove docker docker-engine docker.io containerd runc
設(shè)置倉(cāng)庫(kù)
更新apt包索引:
$ sudo apt-get update
讓apt能通過(guò)HTTPS使用倉(cāng)庫(kù):
$ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common
添加官方的GPG 密鑰:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
驗(yàn)證你的密鑰:
$ sudo apt-key fingerprint 0EBFCD88

設(shè)置選用哪個(gè)版本。
$ sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ test"
我選用了test版本。
安裝
更新apt包索引
$ sudo apt-get update
開(kāi)始安裝
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
測(cè)試
$ sudo docker run hello-world

參考
Get Docker Engine - Coummuntiy for Ubuntu
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持本站。
版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。
關(guān)注官方微信