怎么樣在ubuntu中安裝docker
在Ubuntu中安裝docker的方法及步驟如下:
1、更新ubuntu的apt源索引
sudo apt-get update
2、安裝包允許apt通過HTTPS使用倉庫
推薦學(xué)習: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、設(shè)置Docker穩(wěn)定版?zhèn)}庫
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(社區(qū)版)
sudo apt-get install docker-ce
7、檢查Docker CE是否安裝正確
sudo docker run hello-world
出現(xiàn)如下信息,表示安裝成功