ubuntu 20.04 安裝 docker

詳細安裝步驟,見官網:

https://docs.docker.com/engine/install/ubuntu/

// 查看狀態並配置開機啓動

sudo systemctl status docker

sudo systemctl enable docker

 

// 添加docker的阿里雲源

sudo vim /etc/docker/daemon.json

{
  "registry-mirrors": ["https://h0ulrp80.mirror.aliyuncs.com"]
}

sudo systemctl restart docker

 

// 當前用戶加入docker組(以後執行docker命令不用加sudo)

sudo usermod -aG docker $USER

關閉當前shell,重新打開窗口生效。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章