github.com/guilhermebr/docker@v1.4.2-0.20150428121140-67da055cebca/docs/sources/articles/configuring.md (about)

     1  page_title: Configuring Docker
     2  page_description: Configuring the Docker daemon on various distributions
     3  page_keywords: docker, daemon, configuration
     4  
     5  # Configuring Docker on various distributions
     6  
     7  After successfully installing Docker, the `docker` daemon runs with it's default
     8  configuration. You can configure the `docker` daemon by passing configuration
     9  flags to it directly when you start it.  
    10  
    11  In a production environment, system administrators typically configure the
    12  `docker` daemon to start and stop according to an organization's requirements.  In most
    13  cases, the system administrator configures a process manager such as `SysVinit`, `Upstart`,
    14  or `systemd` to manage the `docker` daemon's start and stop.
    15  
    16  Some of the daemon's options are:
    17  
    18  | Flag                  | Description                                               |
    19  |-----------------------|-----------------------------------------------------------|
    20  | `-D`, `--debug=false` | Enable or disable debug mode.  By default, this is false. |
    21  | `-H`,`--host=[]`      | Daemon socket(s) to connect to.                           |
    22  | `--tls=false`         | Enable or disable TLS. By default, this is false.         |
    23  
    24  The command line reference has the [complete list of daemon flags](/reference/commandline/cli/#daemon).
    25  
    26  ## Direct Configuration
    27  
    28  If you're running the `docker` daemon directly by running `docker -d` instead of using a process manager,
    29  you can append the config options to the run command directly.
    30  
    31  
    32  Here is a an example of running the `docker` daemon with config options:
    33  
    34      docker -d -D --tls=false -H tcp://0.0.0.0:2375
    35  
    36  These options : 
    37  
    38  - Enable `-D` (debug) mode 
    39  - Set `tls` to false
    40  - Listen for connections on `tcp://0.0.0.0:2375`
    41  
    42  
    43  ## Ubuntu
    44  
    45  After successfully [installing Docker for Ubuntu](/installation/ubuntulinux/), you can check the
    46  running status using Upstart in this way:
    47  
    48      $ sudo status docker
    49      docker start/running, process 989
    50  
    51  You can start/stop/restart `docker` using
    52  
    53      $ sudo start docker
    54  
    55      $ sudo stop docker
    56  
    57      $ sudo restart docker
    58  
    59  
    60  ### Configuring Docker
    61  
    62  You configure the `docker` daemon in the `/etc/default/docker` file on your
    63  system.  You do this by specifying values in a `DOCKER_OPTS` variable. 
    64  To configure Docker options:
    65  
    66  1. Log into your system as a user with `sudo` or `root` privileges.
    67  
    68  2. If you don't have one, create the `/etc/default/docker` file in your system. 
    69  
    70  	Depending on how you installed Docker, you may already have this file.
    71  
    72  3. Open the file with your favorite editor.
    73  
    74  		$ sudo vi /etc/default/docker
    75  		
    76  4. Add a `DOCKER_OPTS` variable with the following options. These options are appended to the
    77  `docker` daemon's run command.
    78  
    79  	``` 
    80  	 DOCKER_OPTS=" --dns 8.8.8.8 --dns 8.8.4.4 -D --tls=false -H tcp://0.0.0.0:2375 "
    81  	```
    82  	
    83  These options : 
    84  
    85  - Set `dns` server for all containers
    86  - Enable `-D` (debug) mode 
    87  - Set `tls` to false
    88  - Listen for connections on `tcp://0.0.0.0:2375`
    89    
    90  5. Save and close the file.
    91  
    92  6. Restart the `docker` daemon.
    93  
    94   		 $ sudo restart docker
    95  
    96  7. Verify that the `docker` daemon is running as specified wit the `ps` command.
    97  
    98  		$ ps aux | grep docker | grep -v grep