mirror of https://github.com/docker/docs.git
Add Configuring Docker article [WIP]
Fixes #12088 Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
This commit is contained in:
parent
ccbb93e1cd
commit
9424fc14bb
|
@ -109,6 +109,7 @@ pages:
|
||||||
- ['articles/dockerfile_best-practices.md', 'Articles', 'Best practices for writing Dockerfiles']
|
- ['articles/dockerfile_best-practices.md', 'Articles', 'Best practices for writing Dockerfiles']
|
||||||
- ['articles/certificates.md', 'Articles', 'Using certificates for repository client verification']
|
- ['articles/certificates.md', 'Articles', 'Using certificates for repository client verification']
|
||||||
- ['articles/using_supervisord.md', 'Articles', 'Using Supervisor']
|
- ['articles/using_supervisord.md', 'Articles', 'Using Supervisor']
|
||||||
|
- ['articles/configuring.md', 'Articles', 'Configuring Docker']
|
||||||
- ['articles/cfengine_process_management.md', 'Articles', 'Process management with CFEngine']
|
- ['articles/cfengine_process_management.md', 'Articles', 'Process management with CFEngine']
|
||||||
- ['articles/puppet.md', 'Articles', 'Using Puppet']
|
- ['articles/puppet.md', 'Articles', 'Using Puppet']
|
||||||
- ['articles/chef.md', 'Articles', 'Using Chef']
|
- ['articles/chef.md', 'Articles', 'Using Chef']
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
page_title: Configuring Docker
|
||||||
|
page_description: Configuring the Docker daemon on various distributions
|
||||||
|
page_keywords: docker, daemon, configuration
|
||||||
|
|
||||||
|
# Configuring Docker on various distributions
|
||||||
|
|
||||||
|
After successfully installing the Docker daemon on a distribution, it runs with it's default
|
||||||
|
config. Usually it is required to change the default config to meet one's personal requirements.
|
||||||
|
|
||||||
|
Docker can be configured by passing the config flags to the daemon directly if the daemon
|
||||||
|
is started directly. Usually that is not the case. A process manager (like SysVinit, Upstart,
|
||||||
|
systemd, etc) is responsible for starting and running the daemon.
|
||||||
|
|
||||||
|
Some common config options are
|
||||||
|
|
||||||
|
* `-D` : Enable debug mode
|
||||||
|
|
||||||
|
* `-H` : Daemon socket(s) to connect to
|
||||||
|
|
||||||
|
* `--tls` : Enable or disable TLS authentication
|
||||||
|
|
||||||
|
The complete list of flags can found at [Docker Command Line Reference](/reference/commandline/cli/)
|
||||||
|
|
||||||
|
## Ubuntu
|
||||||
|
|
||||||
|
After successfully [installing Docker for Ubuntu](/installation/ubuntulinux/), you can check the
|
||||||
|
running status using (if running Upstart)
|
||||||
|
|
||||||
|
$ sudo status docker
|
||||||
|
docker start/running, process 989
|
||||||
|
|
||||||
|
You can start/stop/restart `docker` using
|
||||||
|
|
||||||
|
$ sudo start docker
|
||||||
|
|
||||||
|
$ sudo stop docker
|
||||||
|
|
||||||
|
$ sudo restart docker
|
||||||
|
|
||||||
|
|
||||||
|
### Configuring Docker
|
||||||
|
|
||||||
|
Docker options can be configured by editing the file `/etc/default/docker`. If this file does not
|
||||||
|
exist, it needs to be createdThis file contains a variable named `DOCKER_OPTS`. All the
|
||||||
|
config options need to be placed in this variable. For example
|
||||||
|
|
||||||
|
DOCKER_OPTS=" --dns 8.8.8.8 -D --tls=false -H tcp://0.0.0.0:2375 "
|
||||||
|
|
||||||
|
The above daemon options :
|
||||||
|
|
||||||
|
1. Set dns server for all containers
|
||||||
|
|
||||||
|
2. Enable Debug mode
|
||||||
|
|
||||||
|
3. Set tls to false
|
||||||
|
|
||||||
|
4. Make the daemon listen for connections on `tcp://0.0.0.0:2375`
|
||||||
|
|
||||||
|
After saving the file, restart docker using `sudo restart docker`. Verify that the daemon is
|
||||||
|
running with the options specified by running `ps aux | grep docker | grep -v grep`
|
Loading…
Reference in New Issue