本文及资源最后更新时间 2021-01-26 by sky995
安装Docker
阿里源
- curl -fsSL https://get.docker.com | bash -s docker –mirror Aliyun
复制代码
或azure源(中国区azure)
- curl -fsSL https://get.docker.com | bash -s docker –mirror AzureChinaCloud
复制代码
开机自启
- systemctl start docker
- systemctl enable docker
复制代码
配置国内镜像源
- sudo mkdir -p /etc/docker
- sudo tee /etc/docker/daemon.json <<-‘EOF’
- {
- “registry-mirrors”: [“https://0b27f0a81a00f3560fbdc00ddd2f99e0.mirror.swr.myhuaweicloud.com”%5D
- }
- EOF
- sudo systemctl daemon-reload
- sudo systemctl restart docker
复制代码
可选其他源
复制代码
好像可以写多个
复制代码
- sudo mkdir -p /etc/docker
- sudo tee /etc/docker/daemon.json <<-‘EOF’
- {
- “registry-mirrors”: [
- “https://0b27f0a81a00f3560fbdc00ddd2f99e0.mirror.swr.myhuaweicloud.com”,
- “https://ypzju6vq.mirror.aliyuncs.com”,
- “https://registry.docker-cn.com”,
- “http://hub-mirror.c.163.com”,
- “https://docker.mirrors.ustc.edu.cn”
- ]
- }
- EOF
- sudo systemctl daemon-reload
- sudo systemctl restart docker
复制代码
我一直在用一键脚本sudo curl -sSL https://get.daocloud.io/docker | sh