Docker 快速配置文件
保存 /etc/docker/daemon.json
{
"registry-mirrors": [
"https://05f073ad3c0010ea0f4bc00b7105ec20.mirror.swr.myhuaweicloud.com/",
"http://hub-mirror.c.163.com/"
],
"dns": ["114.114.114.114", "223.5.5.5"],
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3",
"labels": "production_status",
"env": "os,customer"
}
}
扩展的配置,配置 nvidia 的直连,需要 nvidia-container。
{
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
},
"default-runtime": "nvidia",
"registry-mirrors": [
"https://docker.mirrors.ustc.edu.cn"
],
"dns": ["1.0.0.1", "223.5.5.5"],
"log-driver": "json-file",
"log-level": "error",
"log-opts": {
"cache-disabled": "false",
"cache-max-file": "5",
"cache-max-size": "20m",
"cache-compress": "true",
"env": "os,customer",
"max-file": "5",
"max-size": "10m"
}
}
Docker Hub 的镜像
华为: 定制公开镜像,需要到 华为云 注册建立
从 https://segmentfault.com/a/1190000023117518 抄来的:D
https://05f073ad3c0010ea0f4bc00b7105ec20.mirror.swr.myhuaweicloud.com/
阿里: 定制公开镜像,需要到 阿里云 注册建立
- :D 没事其实并不好用,所以就不提供了
如果要用可以使用 http://docker.mirrors.ustc.edu.cn
网易: 公有 http://hub-mirror.c.163.com