Browse code

Change all docker -d to docker daemon

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>

Qiang Huang authored on 2015/08/10 21:48:08
Showing 15 changed files
... ...
@@ -167,7 +167,7 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea
167 167
 	}
168 168
 	if err != nil {
169 169
 		if strings.Contains(err.Error(), "connection refused") {
170
-			return fmt.Errorf("Cannot connect to the Docker daemon. Is 'docker -d' running on this host?")
170
+			return fmt.Errorf("Cannot connect to the Docker daemon. Is 'docker daemon' running on this host?")
171 171
 		}
172 172
 		return err
173 173
 	}
... ...
@@ -31,7 +31,7 @@ stop on runlevel [!2345]
31 31
 respawn
32 32
 
33 33
 script
34
-    /usr/bin/docker -d -H=tcp://0.0.0.0:2375
34
+    /usr/bin/docker daemon -H=tcp://0.0.0.0:2375
35 35
 end script
36 36
 ```
37 37
 
... ...
@@ -18,7 +18,7 @@ var (
18 18
 
19 19
 // Config defines the configuration of a docker daemon.
20 20
 // These are the configuration settings that you pass
21
-// to the docker daemon when you launch it with say: `docker -d -e lxc`
21
+// to the docker daemon when you launch it with say: `docker daemon -e lxc`
22 22
 type Config struct {
23 23
 	CommonConfig
24 24
 
... ...
@@ -20,7 +20,7 @@ type bridgeConfig struct {
20 20
 
21 21
 // Config defines the configuration of a docker daemon.
22 22
 // These are the configuration settings that you pass
23
-// to the docker daemon when you launch it with say: `docker -d -e windows`
23
+// to the docker daemon when you launch it with say: `docker daemon -e windows`
24 24
 type Config struct {
25 25
 	CommonConfig
26 26
 
... ...
@@ -75,7 +75,7 @@ status information about the driver.
75 75
 
76 76
 The devicemapper backend supports some options that you can specify
77 77
 when starting the docker daemon using the `--storage-opt` flags.
78
-This uses the `dm` prefix and would be used something like `docker -d --storage-opt dm.foo=bar`.
78
+This uses the `dm` prefix and would be used something like `docker daemon --storage-opt dm.foo=bar`.
79 79
 
80 80
 These options are currently documented both in [the man
81 81
 page](../../../man/docker.1.md) and in [the online
... ...
@@ -13,7 +13,7 @@ cert: build
13 13
 certs: cert
14 14
 
15 15
 run:
16
-	sudo docker -d -D --tlsverify --tlscacert=ca.pem --tlscert=server-cert.pem --tlskey=server-key.pem -H=0.0.0.0:6666 --pidfile=$(pwd)/docker.pid --graph=$(pwd)/graph
16
+	sudo docker daemon -D --tlsverify --tlscacert=ca.pem --tlscert=server-cert.pem --tlskey=server-key.pem -H=0.0.0.0:6666 --pidfile=$(pwd)/docker.pid --graph=$(pwd)/graph
17 17
 
18 18
 client:
19 19
 	sudo docker --tls --tlscacert=ca.pem --tlscert=cert.pem --tlskey=key.pem   -H=$(HOST):6666 version
... ...
@@ -48,7 +48,7 @@ directory including the following:
48 48
     EnvironmentFile=-/etc/sysconfig/docker-storage
49 49
     EnvironmentFile=-/etc/sysconfig/docker-network
50 50
     ExecStart=
51
-    ExecStart=/usr/bin/docker -d -H fd:// $OPTIONS \
51
+    ExecStart=/usr/bin/docker daemon -H fd:// $OPTIONS \
52 52
               $DOCKER_STORAGE_OPTIONS \
53 53
               $DOCKER_NETWORK_OPTIONS \
54 54
               $BLOCK_REGISTRY \
... ...
@@ -108,7 +108,7 @@ by a new configuration as follows:
108 108
 
109 109
     [Service]
110 110
     ExecStart=
111
-    ExecStart=/usr/bin/docker -d -H fd:// --bip=172.17.42.1/16
111
+    ExecStart=/usr/bin/docker daemon -H fd:// --bip=172.17.42.1/16
112 112
 
113 113
 If you fail to specify an empty configuration, Docker reports an error such as:
114 114
 
... ...
@@ -52,7 +52,7 @@ repository](https://github.com/docker/docker/blob/master/CHANGELOG.md).
52 52
 | Logging drivers              | The new logging driver follows the exec driver and storage driver concepts already available in Engine today. There is a new option `--log-driver` to `docker run` command. See the `run` reference for a [description on how to use this option](https://docs.docker.com/reference/run/#logging-drivers-log-driver).                                                                                                                                            |
53 53
 | Image digests                | When you pull, build, or run images, you specify them in the form `namespace/repository:tag`, or even just `repository`. In this release, you are now able to pull, run, build and refer to images by a new content addressable identifier called a “digest” with the syntax `namespace/repo@digest`. See the the command line reference for [examples of using the digest](https://docs.docker.com/reference/commandline/cli/#listing-image-digests).           |
54 54
 | Custom cgroups               | Containers are made from a combination of namespaces, capabilities, and cgroups. Docker already supports custom namespaces and capabilities. Additionally, in this release we’ve added support for custom cgroups. Using the `--cgroup-parent` flag, you can pass a specific `cgroup` to run a container in. See [the command line reference for more information](https://docs.docker.com/reference/commandline/cli/#create).                                   |
55
-| Ulimits                      | You can now specify the default `ulimit` settings for all containers when configuring the daemon. For example:`docker -d --default-ulimit nproc=1024:2048` See [Default Ulimits](https://docs.docker.com/reference/commandline/cli/#default-ulimits) in this documentation.                                                                                                                                                                                   |
55
+| Ulimits                      | You can now specify the default `ulimit` settings for all containers when configuring the daemon. For example:`docker daemon --default-ulimit nproc=1024:2048` See [Default Ulimits](https://docs.docker.com/reference/commandline/cli/#default-ulimits) in this documentation.                                                                                                                                                                                   |
56 56
 | Commit and import Dockerfile | You can now make changes to images on the fly without having to re-build the entire image. The feature `commit --change` and `import --change` allows you to apply standard changes to a new image. These are expressed in the Dockerfile syntax and used to modify the image. For details on how to use these, see the [commit](https://docs.docker.com/reference/commandline/cli/#commit) and [import](https://docs.docker.com/reference/commandline/cli/#import). |
57 57
 
58 58
 ### Known issues in Engine
... ...
@@ -877,7 +877,7 @@ To mount a FUSE based filesystem, you need to combine both `--cap-add` and
877 877
 
878 878
 
879 879
 If the Docker daemon was started using the `lxc` exec-driver
880
-(`docker -d --exec-driver=lxc`) then the operator can also specify LXC options
880
+(`docker daemon --exec-driver=lxc`) then the operator can also specify LXC options
881 881
 using one or more `--lxc-conf` parameters. These can be new parameters or
882 882
 override existing parameters from the [lxc-template.go](
883 883
 https://github.com/docker/docker/blob/master/daemon/execdriver/lxc/lxc_template.go).
... ...
@@ -8,7 +8,7 @@ Using `libkv`, the user can plug any of the supported Key-Value store (such as c
8 8
 User can specify the Key-Value store of choice using the `--kv-store` daemon flag, which takes configuration value of format `PROVIDER:URL`, where
9 9
 `PROVIDER` is the name of the Key-Value store (such as consul, etcd or zookeeper) and
10 10
 `URL` is the url to reach the Key-Value store.
11
-Example : `docker -d --kv-store=consul:localhost:8500`
11
+Example : `docker daemon --kv-store=consul:localhost:8500`
12 12
 
13 13
 Send us feedback and comments on [#14083](https://github.com/docker/docker/issues/14083)
14 14
 or on the usual Google Groups (docker-user, docker-dev) and IRC channels.
... ...
@@ -73,7 +73,7 @@ Docker daemon supports a configuration flag `--default-network` which takes conf
73 73
 `NETWORK` is the name of the network created using the `docker network create` command
74 74
 When a container is created and if the network mode (`--net`) is not specified, then this default network will be used to connect
75 75
 the container. If `--default-network` is not specified, the default network will be the `bridge` driver.
76
-Example : `docker -d --default-network=overlay:multihost`
76
+Example : `docker daemon --default-network=overlay:multihost`
77 77
 
78 78
 ## Using Services
79 79
 
... ...
@@ -327,7 +327,7 @@ release_binaries() {
327 327
 # To install, run the following command as root:
328 328
 curl -sSL -O $(s3_url)/builds/Linux/x86_64/docker-$VERSION && chmod +x docker-$VERSION && sudo mv docker-$VERSION /usr/local/bin/docker
329 329
 # Then start docker in daemon mode:
330
-sudo /usr/local/bin/docker -d
330
+sudo /usr/local/bin/docker daemon
331 331
 EOF
332 332
 
333 333
 	# Add redirect at /builds/info for URL-backwards-compatibility
... ...
@@ -359,7 +359,7 @@ feature include: automatic or interactive thin-pool resize support, dynamically
359 359
 changing thin-pool features, automatic thinp metadata checking when lvm activates
360 360
 the thin-pool, etc.
361 361
 
362
-Example use: `docker -d --storage-opt dm.thinpooldev=/dev/mapper/thin-pool`
362
+Example use: `docker daemon --storage-opt dm.thinpooldev=/dev/mapper/thin-pool`
363 363
 
364 364
 #### dm.basesize
365 365
 
... ...
@@ -378,26 +378,26 @@ value requires additional steps to take effect:
378 378
         $ sudo rm -rf /var/lib/docker
379 379
         $ sudo service docker start
380 380
 
381
-Example use: `docker -d --storage-opt dm.basesize=20G`
381
+Example use: `docker daemon --storage-opt dm.basesize=20G`
382 382
 
383 383
 #### dm.fs
384 384
 
385 385
 Specifies the filesystem type to use for the base device. The
386 386
 supported options are `ext4` and `xfs`. The default is `ext4`.
387 387
 
388
-Example use: `docker -d --storage-opt dm.fs=xfs`
388
+Example use: `docker daemon --storage-opt dm.fs=xfs`
389 389
 
390 390
 #### dm.mkfsarg
391 391
 
392 392
 Specifies extra mkfs arguments to be used when creating the base device.
393 393
 
394
-Example use: `docker -d --storage-opt "dm.mkfsarg=-O ^has_journal"`
394
+Example use: `docker daemon --storage-opt "dm.mkfsarg=-O ^has_journal"`
395 395
 
396 396
 #### dm.mountopt
397 397
 
398 398
 Specifies extra mount options used when mounting the thin devices.
399 399
 
400
-Example use: `docker -d --storage-opt dm.mountopt=nodiscard`
400
+Example use: `docker daemon --storage-opt dm.mountopt=nodiscard`
401 401
 
402 402
 #### dm.use_deferred_removal
403 403
 
... ...
@@ -415,7 +415,7 @@ the container exit still succeeds and this option causes the system to schedule
415 415
 the device for deferred removal. It does not wait in a loop trying to remove a busy
416 416
 device.
417 417
 
418
-Example use: `docker -d --storage-opt dm.use_deferred_removal=true`
418
+Example use: `docker daemon --storage-opt dm.use_deferred_removal=true`
419 419
 
420 420
 #### dm.loopdatasize
421 421
 
... ...
@@ -426,7 +426,7 @@ Specifies the size to use when creating the loopback file for the
426 426
 100G. The file is sparse, so it will not initially take up
427 427
 this much space.
428 428
 
429
-Example use: `docker -d --storage-opt dm.loopdatasize=200G`
429
+Example use: `docker daemon --storage-opt dm.loopdatasize=200G`
430 430
 
431 431
 #### dm.loopmetadatasize
432 432
 
... ...
@@ -437,7 +437,7 @@ Specifies the size to use when creating the loopback file for the
437 437
 is 2G. The file is sparse, so it will not initially take up
438 438
 this much space.
439 439
 
440
-Example use: `docker -d --storage-opt dm.loopmetadatasize=4G`
440
+Example use: `docker daemon --storage-opt dm.loopmetadatasize=4G`
441 441
 
442 442
 #### dm.datadev
443 443
 
... ...
@@ -460,7 +460,7 @@ deprecated.
460 460
 Specifies a custom blocksize to use for the thin pool.  The default
461 461
 blocksize is 64K.
462 462
 
463
-Example use: `docker -d --storage-opt dm.blocksize=512K`
463
+Example use: `docker daemon --storage-opt dm.blocksize=512K`
464 464
 
465 465
 #### dm.blkdiscard
466 466
 
... ...
@@ -474,7 +474,7 @@ times, but it also prevents the space used in `/var/lib/docker` directory
474 474
 from being returned to the system for other use when containers are
475 475
 removed.
476 476
 
477
-Example use: `docker -d --storage-opt dm.blkdiscard=false`
477
+Example use: `docker daemon --storage-opt dm.blkdiscard=false`
478 478
 
479 479
 #### dm.override_udev_sync_check
480 480
 
... ...
@@ -503,7 +503,7 @@ failures, see
503 503
 To allow the `docker` daemon to start, regardless of whether `udev` sync is
504 504
 `false`, set `dm.override_udev_sync_check` to true:
505 505
 
506
-        $ docker -d --storage-opt dm.override_udev_sync_check=true
506
+        $ docker daemon --storage-opt dm.override_udev_sync_check=true
507 507
 
508 508
 When this value is `true`, the driver continues and simply warns you
509 509
 the errors are happening.
... ...
@@ -15,9 +15,9 @@ import (
15 15
 var (
16 16
 	alphaRegexp  = regexp.MustCompile(`[a-zA-Z]`)
17 17
 	domainRegexp = regexp.MustCompile(`^(:?(:?[a-zA-Z0-9]|(:?[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]))(:?\.(:?[a-zA-Z0-9]|(:?[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])))*)\.?\s*$`)
18
-	// DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. docker -d -H tcp://:8080
18
+	// DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. docker daemon -H tcp://:8080
19 19
 	DefaultHTTPHost = "127.0.0.1"
20
-	// DefaultHTTPPort Default HTTP Port used if only the protocol is provided to -H flag e.g. docker -d -H tcp://
20
+	// DefaultHTTPPort Default HTTP Port used if only the protocol is provided to -H flag e.g. docker daemon -H tcp://
21 21
 	// TODO Windows. DefaultHTTPPort is only used on Windows if a -H parameter
22 22
 	// is not supplied. A better longer term solution would be to use a named
23 23
 	// pipe as the default on the Windows daemon.
... ...
@@ -315,7 +315,7 @@ appropriate for your distro's init script to live there too!).
315 315
 In general, Docker should be run as root, similar to the following:
316 316
 
317 317
 ```bash
318
-docker -d
318
+docker daemon
319 319
 ```
320 320
 
321 321
 Generally, a `DOCKER_OPTS` variable of some kind is available for adding more