Docker: Configuration
systemd Unit文件中的参数,与配置文件不能重复指定
Docker内置了一个DNS Server,它用来做两件事情:
- 解析docker network里的容器或Service的IP地址
- 把解析不了的交给外部DNS Server解析(
dns
参数设定的地址)
live-restore:使重启 Docker 服务,而不会导致容器退出;
Deamon.json:
{
"registry-mirrors": [
"https://da5263ax.mirror.aliyuncs.com",
"https://r9xxm8z8.mirror.aliyuncs.com"
],
"insecure-registries": [
"localhost"
],
"exec-opts": ["native.cgroupdriver=systemd"],
"dns": [
"8.8.8.8",
"8.8.4.4"
],
"dns-search": [
"ibm.com",
"b.io"
],
"log-level": "info",
"log-driver": "json-file",
"log-opts": {
"max-size": "1G",
"max-file": "10"
},
"storage-driver": "overlay2",
"storage-opts": [],
"mtu": 1500,
"data-root": "/var/lib/docker",
"oom-score-adjust": -1000,
"experimental": true,
"features": {},
"live-restore": true,
"max-concurrent-downloads": 10,
"max-concurrent-uploads": 10,
"shutdown-timeout": 10,
"debug": false,
"tls": false,
"selinux-enabled": false,
"default-ulimits": {
"nofile": {
"Name": "nofile",
"Hard": 64000,
"Soft": 64000
}
},
"ipv6": false,
"ip-forward": true,
"bip": "172.17.0.1/16",
"default-runtime": "runc"
}
"https://docker.mirrors.ustc.edu.cn"