首頁 > 運維 > Docker > 主體

怎麼樣在ubuntu中安裝docker

angryTom
發布: 2020-03-13 14:50:31
原創
3251 人瀏覽過

怎麼樣在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中文網其他相關文章!

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
作者最新文章
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!