Docker Server Configuration
- 1 External
- 2 Internal
- 3 Overview
- 4 Server Startup Sequence
- 5 Server Startup Configuration
- 6 Server Configuration Options
- 7 daemon.json
- 8 Docker Container Configuration
Server Startup Sequence
systemd Docker Unit File: /usr/lib/systemd/system/docker.service. Depending on the distribution, the unit file may or may not refer configuration from /etc/sysconfig/docker.
Server Startup Configuration
daemon.json also 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.
OS-Dependent Startup Configuration Files Details
Daemon configuration parameters are usually provided in /etc/sysconfig/docker. However, the availability of this file may depend on distribution and installation procedure.
The simples possible way to configure the Docker daemon on Mac is to use the UI: the whale icon-> Preferences -> Daemon.
The "Advanced" section gives access to the content of daemon.json file, which can be edited freely. However, the danger is that a configuration error saved here will prevent the daemon to start. If that happens, the file-system version of the same file can be accessed as follows:
cd ~/Library/Containers/com.docker.docker/Data/database git reset --hard HEAD
The daemon.json becomes available as:
The file can be edited and committed, and the daemon restart.
Server Configuration Options
The following options are Docker server command line options and should be provided on the dockerd daemon command line, when started.
This option instructs the Docker daemon to trust any Docker registry on the indicated subnet, rather than requiring a certificate. The default value is . For OpenShift-integrated Docker, the subnet where Docker expects this registry is the OpenShift SDN services subnet.
... --insecure-registry <list> ...
Not found in Docker 18.03-ce. Also see Docker Networking Concepts.
When asked to search for or pull images, the docker runtime uses the Docker registry (docker.io) to complete those activities. Additional registries can be added to the list with --add-registry.Also see:
To prevent users from pulling images from the Docker registry, after presumably other registry has been configured with --add-registry, use