Docker Configuration
Both docker(1) and dockerd(8) are configured by the same files.
Configuration Files
dockerd(8) is configured primarily with /etc/docker/daemon.json.
IPv6
To enable IPv6, update the configuration file like:
{ "ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64" }
Logging
By default, dockerd(8) writes logs in JSON format without a limit for storage size. To add log rotation, update the configuration file like:
{ "log-driver": "json-file", "log-opts": { "max-size": "1m", "max-file": "3" } }
Storage
Images are written to /var/lib/docker by default. To configure this, update the configuration file like:
{ "data-root": "/path/to/new/data/root" }
Volumes
Volumes are written to /var/lib/docker/volumes by default. This location follows the data-root set above.
Registries
docker(1) refuses to use an insecure registry, including one using a self-signed certificate. To circumvent this, update the dockerd(8) configuration like:
{ "insecure-registries": [ "registry.example.com:8080" ] }