Ubuntu18.04安裝docker


參考

https://www.runoob.com/docker/ubuntu-docker-install.html

1.卸載

sudo apt-get remove docker docker-engine docker.io containerd runc

2.安裝Docker

sudo apt-get update
# 安裝依賴包
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
# 添加 Docker 的官方 GPG 密鑰
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# 驗證您現在是否擁有帶有指紋的密鑰
sudo apt-key fingerprint 0EBFCD88
# 設置穩定版倉庫
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

3.安裝 Docker Engine-Community

# 更新
$ sudo apt-get update
# 安裝最新的Docker-ce 
sudo apt-get install docker-ce
# 啟動
sudo systemctl enable docker
sudo systemctl start docker

4.測試

sudo docker run hello-world

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM