Appendix B. Docker configuration
At various points in this book you’re advised to change your Docker configuration to make changes permanent on starting up your Docker host machines. This appendix will advise you on the best practices for achieving this. The operating system distribution you use will be significant in this context.
The location of the config files for most mainstream distributions is listed in table B.1.
Table B.1. Docker configuration file locations
Distribution |
Configuration |
---|---|
Ubuntu / Debian / Gentoo | /etc/default/docker |
OpenSuse / CentOS / Red Hat | /etc/sysconfg/docker |
Note that some distributions keep the configuration to a single file, whereas others use a directory and multiple files. For example, on Red Hat Enterprise License, there’s a file called /etc/sysconfig/docker/docker-storage, which by convention contains the configuration relating to storage options for the Docker daemon.
If your distribution doesn’t have any files that match the names in table B.1, it’s worth checking for an /etc/docker folder, as there may be relevant files in there.
Within these files, arguments to the Docker daemon’s startup command are managed. For example, when edited, a line such as the following allows you to set the starting arguments for the Docker daemon on your host: