Daemon.json: Difference between revisions
(7 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
=Overview= | =Overview= | ||
daemon.json contains server configuration and it is an alternative to configuration specified as command line parameters and in [[Docker_Server_Configuration#Server_Startup_Configuration|various startup configuration files]] read when the server is started. Initially, daemon.json is empty or missing altogether. The file lives in different places on different systems. On RedHat/Centos and Ubuntu, it is stored in /etc/docker/daemon.json. On Mac installations, the file can be found following the procure specified here: [[Docker_Server_Configuration#Mac|Docker Server Configuration on Mac]]. | |||
On Mac installations, the file can be | |||
=Configuration= | =Configuration= | ||
Line 26: | Line 22: | ||
daemon.json contains a section that can be used to configure [[Docker_Networking_Concepts#The_Default_Bridge_Network|the default bridge network]]. Note that the default bridge network is considered legacy and [[Docker_Networking_Concepts#User-Defined_Bridge_Networks|user-defined bridge networks]] should be used instead. | daemon.json contains a section that can be used to configure [[Docker_Networking_Concepts#The_Default_Bridge_Network|the default bridge network]]. Note that the default bridge network is considered legacy and [[Docker_Networking_Concepts#User-Defined_Bridge_Networks|user-defined bridge networks]] should be used instead. | ||
<syntaxhighlight lang='json'> | |||
{ | |||
"bip": "192.168.1.5/24", | |||
"fixed-cidr": "192.168.1.5/25", | |||
"fixed-cidr-v6": "2001:db8::/64", | |||
"mtu": 1500, | |||
"default-gateway": "10.20.1.1", | |||
"default-gateway-v6": "2001:db8:abcd::89", | |||
"dns": ["10.20.1.2","10.20.1.3"] | |||
} | |||
</syntaxhighlight> |
Latest revision as of 03:14, 2 May 2018
Internal
Overview
daemon.json contains server configuration and it is an alternative to configuration specified as command line parameters and in various startup configuration files read when the server is started. Initially, daemon.json is empty or missing altogether. The file lives in different places on different systems. On RedHat/Centos and Ubuntu, it is stored in /etc/docker/daemon.json. On Mac installations, the file can be found following the procure specified here: Docker Server Configuration on Mac.
Configuration
insecure-registries
{
"insecure-registries" : ["192.168.1.10:5000"]
}
The same behavior can be specified by setting command-line startup parameter --insecure-registry.
The Default Bridge Network
daemon.json contains a section that can be used to configure the default bridge network. Note that the default bridge network is considered legacy and user-defined bridge networks should be used instead.
{
"bip": "192.168.1.5/24",
"fixed-cidr": "192.168.1.5/25",
"fixed-cidr-v6": "2001:db8::/64",
"mtu": 1500,
"default-gateway": "10.20.1.1",
"default-gateway-v6": "2001:db8:abcd::89",
"dns": ["10.20.1.2","10.20.1.3"]
}