Everything about Docker daemon json


Docker json config file

WARNING: Never try changes on production unless you know what you are doing. Always try changes at QA or staging environments before you apply changes on production!

Docker allow to use a json file for setting the flags values. The json keys use the same name as the command flags, using “s” for flags that allow multiple values.

For using the json configuration file you can use the argument --config-file or edit the /etc/docker/daemon.json on linux or C:\ProgramData\docker\config\daemon.json for windows

Remember to avoid using the same flags in the command and in the file, docker command will fail to start on duplicated configuration values.

In this tutorial, we will also provide a json example configuration for docker.

The current document is a summary of the official docker documentation about the json configuration file

Docker daemon config reload

After you changed values on the json file, you can reload the deamon using SIGUP signal on linux. Not all the configuration flags support reloading.eval(ez_write_tag([[970,250],'tutorials_technology-medrectangle-4','ezslot_0',136,'0','0']));

Example Docker deamon.json

The next example configuration is for the linux operating system:

{ "api-cors-header": "", "authorization-plugins": [], "bip": "", "bridge": "", "cgroup-parent": "", "cluster-store": "", "cluster-store-opts": {}, "cluster-advertise": "", "debug": true, "default-gateway": "", "default-gateway-v6": "", "default-runtime": "runc", "disable-legacy-registry": false, "dns": [], "dns-opts": [], "dns-search": [], "exec-opts": [], "exec-root": "", "fixed-cidr": "", "fixed-cidr-v6": "", "graph": "", "group": "", "hosts": ["fd://","unix:///var/run/docker.sock","tcp://"], "icc": true, "insecure-registries": [], "ip": "", "iptables": true, "ipv6": false, "ip-forward": false, "ip-masq": false, "labels": [], "live-restore": true, "log-driver": "", "log-level": "", "log-opts": {}, "max-concurrent-downloads": 3, "max-concurrent-uploads": 5, "mtu": 0, "oom-score-adjust": -500, "pidfile": "", "raw-logs": false, "registry-mirrors": [], "runtimes": {}, "selinux-enabled": false, "storage-driver": "", "storage-opts": [], "swarm-default-advertise-addr": "", "tls": true, "tlscacert": "/etc/docker/tls/ca.pem", "tlscert": "/etc/docker/tls/server-cert.pem", "tlskey": "/etc/docker/tls/server-key.pem", "tlsverify": true, "userland-proxy": false, "userns-remap": "" } eval(ez_write_tag([[970,250],'tutorials_technology-medrectangle-3','ezslot_2',114,'0','0'])); Leave comments if you need more information on this tutorial!