docker ubuntu安裝

在安裝docker以前,建議加上國內apt 鏡像資源, 好比清華、中科院的國內鏡像資源linux

1. 更新apt安裝包索引docker



sudo apt-get update

2. 安裝ubuntu




3.添加官方Gpg keysudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

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

5. 開始安裝docker ce社區版
sudo apt-get install docker-ce

6. 驗證是否安裝成功
sudo docker run hello-world
相關文章
相關標籤/搜索