卸載舊版本
如果之前安裝舊版本,需要先卸載:
$ sudo apt-get remove docker docker-engine docker.io containerd runc
設(shè)置倉(cāng)庫(kù)
更新apt
包索引:
$ sudo apt-get update
讓apt
能通過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
開始安裝
$ 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í)有所幫助,也希望大家多多支持腳本之家。
標(biāo)簽:資陽(yáng) 混顯 延安 亳州 丹東 賀州 三沙 滄州
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《在Ubuntu18.04上安裝Docker CE的方法(社區(qū)版)》,本文關(guān)鍵詞 在,Ubuntu18.04,上,安裝,Docker,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。