1.安装docker
1 sudo apt-get update 2 sudo apt-get install docker.io
2.创建或编辑docker的镜像源配置文件:/etc/docker/daemon.json
写入以下内容将配置为中国科技大学docker镜像源
1 { 2 "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"] 3 }
3.启动docker服务,设置docker开机启动
1 sudo systemctl start docker.service 2 sudo systemctl enable docker.service