Docker安裝

Docker安裝

官方:https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#upgrade-docker-after-using-the-convenience-script

環(huán)境

Ubuntu 17.04

版本--CE 17.09

https://docs.docker.com/engine/installation/
Docker is available in two editions: Community Edition (CE) and Enterprise Edition (EE).

第一步:檢查環(huán)境

lsb_release -cs
以下均可

rtful 17.10 (Docker CE 17.11 Edge only)
Zesty 17.04
Xenial 16.04 (LTS)
Trusty 14.04 (LTS)

第二步:升級(jí)包管理器

sudo apt-get update

第三步:添加HTTPS倉(cāng)庫(kù)

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

第四步:添加docker的官方GPG密鑰

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  • 校驗(yàn)
指令:udo apt-key fingerprint 0EBFCD88
apt-key:9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88

第五步:添加倉(cāng)庫(kù)

  • amd64:(64位首選)

sudo add-apt-repository
"deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(lsb_release -cs)
stable"

  • armhf:

sudo add-apt-repository
"deb [arch=armhf] https://download.docker.com/linux/ubuntu
$(lsb_release -cs)
stable"

  • s390x:

sudo add-apt-repository
"deb [arch=s390x] https://download.docker.com/linux/ubuntu
$(lsb_release -cs)
stable"

第六步:執(zhí)行安裝指令

  • 需要先更新包管理器

udo apt-get update
sudo apt-get install docker-ce

第七步:查看版本并校驗(yàn)

  • 查看版本

sudo docker info

  • 運(yùn)行測(cè)試命令(執(zhí)行返回結(jié)果后立即退出)

sudo docker run hello-world

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容