On Linux

The default location of the configuration file on Linux is /etc/docker/daemon.json. The --config-file flag can be used to specify a non-default location.

This is a full example of the allowed configuration options on Linux:

{
"authorization-plugins": [],
"data-root": "",
"dns": [],
"dns-opts": [],
"dns-search": [],
"exec-opts": [],
"exec-root": "",
"experimental": false,
"storage-driver": "",
"storage-opts": [],
"labels": [],
"live-restore": true,
"log-driver": "",
"log-opts": {},
"mtu": 0,
"pidfile": "",
"cluster-store": "",
"cluster-store-opts": {},
"cluster-advertise": "",
"max-concurrent-downloads": 3,
"max-concurrent-uploads": 5,
"default-shm-size": "64M",
"shutdown-timeout": 15,
"debug": true,
"hosts": [],
"log-level": "",
"tls": true,
"tlsverify": true,
"tlscacert": "",
"tlscert": "",
"tlskey": "",
"swarm-default-advertise-addr": "",
"api-cors-header": "",
"selinux-enabled": false,
"userns-remap": "",
"group": "",
"cgroup-parent": "",
"default-ulimits": {},
"init": false,
"init-path": "/usr/libexec/docker-init",
"ipv6": false,
"iptables": false,
"ip-forward": false,
"ip-masq": false,
"userland-proxy": false,
"userland-proxy-path": "/usr/libexec/docker-proxy",
"ip": "0.0.0.0",
"bridge": "",
"bip": "",
"fixed-cidr": "",
"fixed-cidr-v6": "",
"default-gateway": "",
"default-gateway-v6": "",
"icc": false,
"raw-logs": false,
"allow-nondistributable-artifacts": [],
"registry-mirrors": [],
"seccomp-profile": "",
"insecure-registries": [],
"no-new-privileges": false,
"default-runtime": "runc",
"oom-score-adjust": -500,
"node-generic-resources": ["NVIDIA-GPU=UUID1", "NVIDIA-GPU=UUID2"],
"runtimes": {
"cc-runtime": {
"path": "/usr/bin/cc-runtime"
},
"custom": {
"path": "/usr/local/bin/my-runc-replacement",
"runtimeArgs": [
"--debug"
]
}
}
}

Note: You cannot set options in daemon.json that have already been set on daemon startup as a flag. On systems that use systemd to start the Docker daemon, -H is already set, so you cannot use the hosts key in daemon.json to add listening addresses. See https://docs.docker.com/engine/admin/systemd/#custom-docker-daemon-options for how to accomplish this task with a systemd drop-in file.

On Windows

The default location of the configuration file on Windows is %programdata%\docker\config\daemon.json. The --config-file flag can be used to specify a non-default location.

This is a full example of the allowed configuration options on Windows:

{
"authorization-plugins": [],
"data-root": "",
"dns": [],
"dns-opts": [],
"dns-search": [],
"exec-opts": [],
"experimental": false,
"storage-driver": "",
"storage-opts": [],
"labels": [],
"log-driver": "",
"mtu": 0,
"pidfile": "",
"cluster-store": "",
"cluster-advertise": "",
"max-concurrent-downloads": 3,
"max-concurrent-uploads": 5,
"shutdown-timeout": 15,
"debug": true,
"hosts": [],
"log-level": "",
"tlsverify": true,
"tlscacert": "",
"tlscert": "",
"tlskey": "",
"swarm-default-advertise-addr": "",
"group": "",
"default-ulimits": {},
"bridge": "",
"fixed-cidr": "",
"raw-logs": false,
"allow-nondistributable-artifacts": [],
"registry-mirrors": [],
"insecure-registries": []
}

更多信息可以参考官网:https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file

docker daemon文件/etc/docker/daemon.json配置的更多相关文章

  1. docker log 文件 清理

    1 查看docker log 文件位置  docker inspect *** 2 定时清理 runcate -s 0 /var/lib/docker/containers/*/*-json.log

  2. 微信小程序--代码构成---JSON 配置

    在上一章中,我们通过开发者工具快速创建了一个 QuickStart 项目.你可以留意到这个项目里边生成了不同类型的文件: .json 后缀的 JSON 配置文件 .wxml 后缀的 WXML 模板文件 ...

  3. 通过daemon.json配置docker 2375 API端口,配置私有http仓库

    编辑daemon.json vi /etc/docker/daemon.json 配置如下内容即可 { "hosts":[ "tcp://0.0.0.0:2375&quo ...

  4. docker 内部组件结构 -- docker daemon, container,runC

    Docker, Containerd, RunC : 从 Docker 1.11 开始, docker 容器运行已经不是简单地通过 Docker Daemon 来启动, 而是集成了Container, ...

  5. 解决 docker 报错: Error starting daemon: error initializing graphdriver: backing file system is unsupported for this graph driver

    CentOS 7.5 x64下 sudo yum install docker -y systemctl enable docker systemctl start docker 发现启动失败 jou ...

  6. Ubuntu 18.04下Couldn't connect to Docker daemon at http+docker://localunixsocket解决办法

    一台服务器系统为:Ubuntu 18.04 LTS,上面建了git裸仓库,用于开发吧代码push到这里.同时WEB测试环境通过docker也部署在这台.通过git钩子post-receive,当有新代 ...

  7. docker search mysql Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

    1.docker search mysql 报错 [root@localhost usr]# docker search mysqlCannot connect to the Docker daemo ...

  8. 【转载】Docker 安装后 报 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 解决办法

    Docker Docker 安装后 报 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docke ...

  9. Docker 启动遇到 Error starting daemon: Error initializing network controller 错误

    docker 版本 1.10.3 一台装有 docker 的机器重启后,没法启动,/var/log/messages 展示如下错误信息: May 17 11:11:14 gziba-hc03 syst ...

随机推荐

  1. Jmeter执行Java请求

    Jmeter执行Java请求(QQ交流群:577439379) 一.打开Eclipse,创建一个Java工程 二.拷贝jmeter所依赖的jar包 将jmeter中,\lib\ext目录下的Apach ...

  2. windows下php7安装redis扩展

    windows下php7安装redis扩展windows下开发用的wamp集成的环境,想装个php-redis扩展.php_redis.dll下载地址:https://pecl.php.net/pac ...

  3. HBase,region以及HFile概念

    什么是HBase的Region? 大家一定对一个词不陌生:域分区,这个域就是Region:Region定义为key的一个取值范围的子集的数据载体:比如常见的域分区有固定大小分区,比如1-10一个reg ...

  4. Mybatis selectKey标签的keyProperty属性报错,关键字间隔不能有空格

    源代码片段: <insert id="addAdminAction" parameterType="x.x.x.RoleVo"> <selec ...

  5. 【monkeyrunner】monkeyrunner 实例

    import time import os import re from com.android.monkeyrunner import MonkeyRunner as mr from com.and ...

  6. java 面向对象 — 继承

    继承中的构造方法,先执行父类中的构造方法,然后执行子类中的构造方法 继承中的属性,最后执行的属性 覆盖前面的属性 因为是开辟了 两个内存空间,所以相比较是不同的. 如果想比较两个对象的值是否相同的话, ...

  7. FatJar—Java Application制作jar包

    Fat Jar功能非常强大,先下载吧. 下载地址:sourceforge.net/projects/fjep/files/ http://files.cnblogs.com/files/nidongd ...

  8. Go语言面组合式向对象编程基础总结

    转自:http://blog.csdn.net/yue7603835/article/details/44282823 Go语言的面向对象编程简单而干净,通过非侵入式接口模型,否定了C/C++ Jav ...

  9. Linux服务器安全之用户密钥认证登录

    转自:http://blog.sina.com.cn/s/blog_6561ca8c0102vb0d.html 一. 密钥简介 在Linux下,远程登录系统有两种认证方式:密码认证和密钥认证.密码认证 ...

  10. Oracle RAC 集群环境下日志文件结构

    Oracle RAC 集群环境下日志文件结构 在Oracle RAC环境中,对集群中的日志的定期检查是必不可少的.通过查看集群日志,可以早期定位集群环境中出现的问题,以便将问题消灭在萌芽状态.简单介绍 ...