CentOS安裝docker

1、設置倉庫

1.更新apt包索引

  • apt-get update

2.安裝軟件包,使它容許apt經過HTTPS使用倉庫

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

3.添加Docker的官方GPG密鑰

  

4.使用如下命令來設置 stable 的倉庫。即便你想從 _edge _ 或 test 倉庫安裝構建,也老是須要 stable 的倉庫。要添加 _edge _ 或 test 倉庫,請在下面的命令中在單詞stable以後添加edge或test(或二者)

  • 這裏我選擇添加test

  

 

2、安裝docker ce

1.更新apt包索引

  • apt-get update

2.安裝最新版本有 Dcoker CE

  • apt-get install docker-ce

3.經過運行hello-world 鏡像驗證Docker CE是否正確安裝

  • docker run hello-world

  

相關文章
相關標籤/搜索