3.1 Docker Engine Configuration

It is possible to configure the Docker Engine runtime options in a variety of ways. Where possible, Oracle recommends using the /etc/docker/daemon.json file to configure these options. For more information on the format and options for this configuration file, see https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file.

In rare instances, some runtime configuration options may not have an equivalent option that can be set in /etc/docker/daemon.json. Oracle previously allowed users to set these runtime options by editing variables in /etc/sysconfig/docker, /etc/sysconfig/docker-network and /etc/sysconfig/docker-storage. While these files can still be used for this purpose, they may be deprecated in future releases. Oracle recommends creating an alternate drop-in unit for the Docker Systemd service where you may need to specify alternate runtime options when loading the Docker Engine.

For example, you can create /etc/docker/daemon.json to contain the following content:

  "selinux-enabled": true

When you have finished editing the configuration file, reload to scan for new or changed units:

# systemctl daemon-reload

Finally, restart the Docker Engine service:

# systemctl restart docker