首頁  >  文章  >  運維  >  怎麼樣在ubuntu中安裝docker

怎麼樣在ubuntu中安裝docker

angryTom
angryTom原創
2020-03-13 14:50:313341瀏覽

怎麼樣在ubuntu中安裝docker

怎麼樣在ubuntu中安裝docker    

在Ubuntu中安裝docker的方法及步驟如下:

1、更新ubuntu的apt來源索引

sudo apt-get update

2、安裝套件允許apt透過HTTPS使用倉庫

##推薦學習:

docker教學

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

3、新增Docker官方GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

4、設定Docker穩定版倉庫

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

5、新增倉庫後,更新apt來源索引

sudo apt-get update

6、安裝最新版Docker CE(社群版)

sudo apt-get install docker-ce

7 、檢查Docker CE是否安裝正確

sudo docker run hello-world

出現以下訊息,表示安裝成功

怎麼樣在ubuntu中安裝docker

以上是怎麼樣在ubuntu中安裝docker的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn