Editing /etc/docker/daemon.json

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
<code>[[/etc/docker/]]daemon.json</code> (Ref: https://docs.docker.com/engine/reference/commandline/dockerd/)
+
<code>/etc/docker/daemon.json</code> (Ref: https://docs.docker.com/engine/reference/commandline/dockerd/)
 +
 
 +
By default  in [[Ubuntu 20.04 LTS]] do not exists <code>/etc/docker/daemon.json</code>
  
* In [[Ubuntu 20.04 LTS]] by default do not exists <code>/etc/docker/daemon.json</code>
 
* macOS: <code>[[~/.docker/daemon.json]]</code>
 
  
  
 
== Options ==
 
== Options ==
 
  {
 
  {
     "insecure-[[registries]]" : [ "hostname.cloudapp.net:5000" ]
+
     "insecure-registries" : [ "hostname.cloudapp.net:5000" ]
}
 
 
 
{
 
    "data-root": "[[/srv/]]XXXX"
 
 
  }
 
  }
  
  
"[[registry-mirrors]]":
 
  
 
== Configure Docker as [[Prometheus]] target ==
 
== Configure Docker as [[Prometheus]] target ==
Line 21: Line 16:
 
https://docs.docker.com/config/daemon/prometheus/
 
https://docs.docker.com/config/daemon/prometheus/
 
  {
 
  {
   "metrics-addr" : "127.0.0.1:[[9323]]",
+
   "metrics-addr" : "127.0.0.1:9323",
   "[[experimental]]" : true
+
   "experimental" : true
 
  }
 
  }
  
* <code>[[docker --help]]</code>
 
  
== Related terms ==
+
== Help ==
* <code>[[/var/lib/docker/]]</code>
+
<pre>
* <code>[[/var/lib/docker/containers/hash of the container/hostconfig.json]]</code>
+
Usage: dockerd COMMAND
* <code>[[systemctl restart]] docker.service</code>
+
 
* <code>[[~/.docker/config.json]]</code>
+
A self-sufficient runtime for containers.
* <code>[[docker info]]</code>
+
 
 +
Options:
 +
      --add-runtime runtime                  Register an additional OCI compatible runtime (default [])
 +
      --allow-nondistributable-artifacts list Allow push of nondistributable artifacts to registry
 +
      --api-cors-header string                Set CORS headers in the Engine API
 +
      --authorization-plugin list            Authorization plugins to load
 +
      --bip string                            Specify network bridge IP
 +
  -b, --bridge string                        Attach containers to a network bridge
 +
      --cgroup-parent string                  Set parent cgroup for all containers
 +
      --cluster-advertise string              Address or interface name to advertise
 +
      --cluster-store string                  URL of the distributed storage backend
 +
      --cluster-store-opt map                Set cluster store options (default map[])
 +
      --config-file string                    Daemon configuration file (default "/etc/docker/daemon.json")
 +
      --containerd string                    containerd grpc address
 +
      --cpu-rt-period int                    Limit the CPU real-time period in microseconds
 +
      --cpu-rt-runtime int                    Limit the CPU real-time runtime in microseconds
 +
      --cri-containerd                        start containerd with cri
 +
      --data-root string                      Root directory of persistent Docker state (default "/var/lib/docker")
 +
  -D, --debug                                Enable debug mode
 +
      --default-address-pool pool-options    Default address pools for node specific local networks
 +
      --default-gateway ip                    Container default gateway IPv4 address
 +
      --default-gateway-v6 ip                Container default gateway IPv6 address
 +
      --default-ipc-mode string              Default mode for containers ipc ("shareable" | "private") (default "private")
 +
      --default-runtime string                Default OCI runtime for containers (default "runc")
 +
      --default-shm-size bytes                Default shm size for containers (default 64MiB)
 +
      --default-ulimit ulimit                Default ulimits for containers (default [])
 +
      --dns list                              DNS server to use
 +
      --dns-opt list                          DNS options to use
 +
      --dns-search list                      DNS search domains to use
 +
      --exec-opt list                        Runtime execution options
 +
      --exec-root string                      Root directory for execution state files (default "/var/run/docker")
 +
      --experimental                          Enable experimental features
 +
      --fixed-cidr string                    IPv4 subnet for fixed IPs
 +
      --fixed-cidr-v6 string                  IPv6 subnet for fixed IPs
 +
  -G, --group string                          Group for the unix socket (default "docker")
 +
      --help                                  Print usage
 +
  -H, --host list                            Daemon socket(s) to connect to
 +
      --icc                                  Enable inter-container communication (default true)
 +
      --init                                  Run an init in the container to forward signals and reap processes
 +
      --init-path string                      Path to the docker-init binary
 +
      --insecure-registry list                Enable insecure registry communication
 +
      --ip ip                                Default IP when binding container ports (default 0.0.0.0)
 +
      --ip-forward                            Enable net.ipv4.ip_forward (default true)
 +
      --ip-masq                              Enable IP masquerading (default true)
 +
      --iptables                              Enable addition of iptables rules (default true)
 +
      --ipv6                                  Enable IPv6 networking
 +
      --label list                            Set key=value labels to the daemon
 +
      --live-restore                          Enable live restore of docker when containers are still running
 +
      --log-driver string                    Default driver for container logs (default "json-file")
 +
  -l, --log-level string                      Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
 +
      --log-opt map                          Default log driver options for containers (default map[])
 +
      --max-concurrent-downloads int          Set the max concurrent downloads for each pull (default 3)
 +
      --max-concurrent-uploads int            Set the max concurrent uploads for each push (default 5)
 +
      --metrics-addr string                  Set default address and port to serve the metrics api on
 +
      --mtu int                              Set the containers network MTU
 +
      --network-control-plane-mtu int        Network Control plane MTU (default 1500)
 +
      --no-new-privileges                    Set no-new-privileges by default for new containers
 +
      --node-generic-resource list            Advertise user-defined resource
 +
      --oom-score-adjust int                  Set the oom_score_adj for the daemon (default -500)
 +
  -p, --pidfile string                        Path to use for daemon PID file (default "/var/run/docker.pid")
 +
      --raw-logs                              Full timestamps without ANSI coloring
 +
      --registry-mirror list                  Preferred Docker registry mirror
 +
      --rootless                              Enable rootless mode; typically used with RootlessKit (experimental)
 +
      --seccomp-profile string                Path to seccomp profile
 +
      --selinux-enabled                      Enable selinux support
 +
      --shutdown-timeout int                  Set the default shutdown timeout (default 15)
 +
  -s, --storage-driver string                Storage driver to use
 +
      --storage-opt list                      Storage driver options
 +
      --swarm-default-advertise-addr string  Set default address or interface for swarm advertised address
 +
      --tls                                  Use TLS; implied by --tlsverify
 +
      --tlscacert string                      Trust certs signed only by this CA (default "~/.docker/ca.pem")
 +
      --tlscert string                        Path to TLS certificate file (default "~/.docker/cert.pem")
 +
      --tlskey string                        Path to TLS key file (default "~/.docker/key.pem")
 +
      --tlsverify                            Use TLS and verify the remote
 +
      --userland-proxy                        Use userland proxy for loopback traffic (default true)
 +
      --userland-proxy-path string            Path to the userland proxy binary
 +
      --userns-remap string                  User/Group setting for user namespaces
 +
  -v, --version                              Print version information and quit
 +
</pre>
 +
 
 +
 
  
 
== See also ==
 
== See also ==

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Template used on this page:

Advertising: