docker配置参数

时间:2021-07-21
本文章向大家介绍docker配置参数,主要包括docker配置参数使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

  

systemd Unit文件中的参数,与配置文件不能重复指定

 

Docker内置了一个DNS Server,它用来做两件事情:

  1. 解析docker network里的容器或Service的IP地址
  2. 把解析不了的交给外部DNS Server解析(dns参数设定的地址)

live-restore:使重启 Docker 服务,而不会导致容器退出;

{
  "registry-mirrors": [
    "https://r9xxm8z8.mirror.aliyuncs.com",
    "https://registry.docker-cn.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": false,
  "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://www.cnblogs.com/dissipate/p/15039295.html