原文
- sudo apt update
- sudo apt install apt-transport-https ca-certificates curl software-properties-common
- sudo -i
- curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-ce.gpg
- sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt update
- sudo apt install docker-ce docker-ce-cli containerd.io
- sudo nano /etc/docker/daemon.json
{
"registry-mirrors": [
"https://registry.docker-cn.com",
"https://docker.mirrors.ustc.edu.cn",
"https://hub-mirror.c.163.com",
"https://mirror.baidubce.com",
"https://ccr.ccs.tencentyun.com"
]
}
- sudo systemctl daemon-reload
- sudo systemctl restart docker
- sudo docker run hello-world //for test
网友评论