Docker Server Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 17: Line 17:
==Mac==
==Mac==


I am using Docker for Mac 1.13.0 on MacOS 10.12 and the daemon settings can be accessed via the Docker app (Preferences -> Daemon -> Advanced).
The simples possible way to configure the Docker daemon on Mac is to use the UI: the whale icon-> Preferences -> Daemon.


But if you change this to something wrong, you will render your installation unusable (the daemon will no longer start-up). This happened to me.
The "Basic" section has UI elements to configure insecure registries and registry mirrors.


I found out that the settings are stored in a Git repository in ~/Library/Containers/com.docker.docker/Data/database where I had to issue a git reset --hard HEAD before I could change anything. After that the daemon settings are available in ~/Library/Containers/com.docker.docker/Data/database/com.docker.driver.amd64-linux/etc/docker/daemon.json.
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:


Edit, commit and restart the Docker app … et voilà … the daemon starts again.
cd ~/Library/Containers/com.docker.docker/Data/database
git reset --hard HEAD
 
The daemon.json becomes available as:
 
~/Library/Containers/com.docker.docker/Data/database/com.docker.driver.amd64-linux/etc/docker/daemon.json
 
The file can be edited and committed, and the daemon restart.


=Files=
=Files=

Revision as of 20:01, 20 April 2018

External

Internal

Overview

OS-Dependent Details

RedHat/Centos

Ubuntu

Mac

The simples possible way to configure the Docker daemon on Mac is to use the UI: the whale icon-> Preferences -> Daemon.

The "Basic" section has UI elements to configure insecure registries and registry mirrors.

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:

~/Library/Containers/com.docker.docker/Data/database/com.docker.driver.amd64-linux/etc/docker/daemon.json

The file can be edited and committed, and the daemon restart.

Files

/etc/sysconfig/docker

/etc/sysconfig/docker

/etc/docker/daemon.json

/etc/docker/daemon.json

Server Command Line Options

--net

Also see

Docker Concepts - Container Networking

Docker Container Configuration

Docker Container Configuration