From 81cc8ebc93c20537d5fab4c016a3774f58b3e483 Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Mon, 10 Aug 2015 20:48:08 +0800 Subject: [PATCH] Change all docker -d to docker daemon Signed-off-by: Qiang Huang --- api/client/hijack.go | 2 +- contrib/vagrant-docker/README.md | 2 +- daemon/config_unix.go | 2 +- daemon/config_windows.go | 2 +- daemon/graphdriver/devmapper/README.md | 2 +- docs/articles/https/Makefile | 2 +- docs/articles/systemd.md | 4 ++-- docs/misc/release-notes.md | 2 +- docs/reference/run.md | 2 +- experimental/network_overlay.md | 2 +- experimental/networking.md | 2 +- hack/release.sh | 2 +- man/docker.1.md | 22 +++++++++++----------- opts/opts.go | 4 ++-- project/PACKAGERS.md | 2 +- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/api/client/hijack.go b/api/client/hijack.go index 5853d79b47..a65468074c 100644 --- a/api/client/hijack.go +++ b/api/client/hijack.go @@ -167,7 +167,7 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea } if err != nil { if strings.Contains(err.Error(), "connection refused") { - return fmt.Errorf("Cannot connect to the Docker daemon. Is 'docker -d' running on this host?") + return fmt.Errorf("Cannot connect to the Docker daemon. Is 'docker daemon' running on this host?") } return err } diff --git a/contrib/vagrant-docker/README.md b/contrib/vagrant-docker/README.md index 4ef9c28775..c1ab6e8d46 100644 --- a/contrib/vagrant-docker/README.md +++ b/contrib/vagrant-docker/README.md @@ -31,7 +31,7 @@ stop on runlevel [!2345] respawn script - /usr/bin/docker -d -H=tcp://0.0.0.0:2375 + /usr/bin/docker daemon -H=tcp://0.0.0.0:2375 end script ``` diff --git a/daemon/config_unix.go b/daemon/config_unix.go index 5fd4934b58..b5d160d17c 100644 --- a/daemon/config_unix.go +++ b/daemon/config_unix.go @@ -18,7 +18,7 @@ var ( // Config defines the configuration of a docker daemon. // These are the configuration settings that you pass -// to the docker daemon when you launch it with say: `docker -d -e lxc` +// to the docker daemon when you launch it with say: `docker daemon -e lxc` type Config struct { CommonConfig diff --git a/daemon/config_windows.go b/daemon/config_windows.go index dd7bb82a58..bc0833aa9e 100644 --- a/daemon/config_windows.go +++ b/daemon/config_windows.go @@ -20,7 +20,7 @@ type bridgeConfig struct { // Config defines the configuration of a docker daemon. // These are the configuration settings that you pass -// to the docker daemon when you launch it with say: `docker -d -e windows` +// to the docker daemon when you launch it with say: `docker daemon -e windows` type Config struct { CommonConfig diff --git a/daemon/graphdriver/devmapper/README.md b/daemon/graphdriver/devmapper/README.md index 4d2cad7b91..fa130ac5e2 100644 --- a/daemon/graphdriver/devmapper/README.md +++ b/daemon/graphdriver/devmapper/README.md @@ -75,7 +75,7 @@ status information about the driver. The devicemapper backend supports some options that you can specify when starting the docker daemon using the `--storage-opt` flags. -This uses the `dm` prefix and would be used something like `docker -d --storage-opt dm.foo=bar`. +This uses the `dm` prefix and would be used something like `docker daemon --storage-opt dm.foo=bar`. These options are currently documented both in [the man page](../../../man/docker.1.md) and in [the online diff --git a/docs/articles/https/Makefile b/docs/articles/https/Makefile index f06e0d256e..3c84697461 100644 --- a/docs/articles/https/Makefile +++ b/docs/articles/https/Makefile @@ -13,7 +13,7 @@ cert: build certs: cert run: - 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 + 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 client: sudo docker --tls --tlscacert=ca.pem --tlscert=cert.pem --tlskey=key.pem -H=$(HOST):6666 version diff --git a/docs/articles/systemd.md b/docs/articles/systemd.md index d9d664f6b9..1722a279a6 100644 --- a/docs/articles/systemd.md +++ b/docs/articles/systemd.md @@ -48,7 +48,7 @@ directory including the following: EnvironmentFile=-/etc/sysconfig/docker-storage EnvironmentFile=-/etc/sysconfig/docker-network ExecStart= - ExecStart=/usr/bin/docker -d -H fd:// $OPTIONS \ + ExecStart=/usr/bin/docker daemon -H fd:// $OPTIONS \ $DOCKER_STORAGE_OPTIONS \ $DOCKER_NETWORK_OPTIONS \ $BLOCK_REGISTRY \ @@ -108,7 +108,7 @@ by a new configuration as follows: [Service] ExecStart= - ExecStart=/usr/bin/docker -d -H fd:// --bip=172.17.42.1/16 + ExecStart=/usr/bin/docker daemon -H fd:// --bip=172.17.42.1/16 If you fail to specify an empty configuration, Docker reports an error such as: diff --git a/docs/misc/release-notes.md b/docs/misc/release-notes.md index 5104cd40b3..9e7b598653 100644 --- a/docs/misc/release-notes.md +++ b/docs/misc/release-notes.md @@ -52,7 +52,7 @@ repository](https://github.com/docker/docker/blob/master/CHANGELOG.md). | 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). | | 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). | | 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). | -| 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. | +| 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. | | 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). | ### Known issues in Engine diff --git a/docs/reference/run.md b/docs/reference/run.md index df3f656ac6..837eb0baea 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -877,7 +877,7 @@ To mount a FUSE based filesystem, you need to combine both `--cap-add` and If the Docker daemon was started using the `lxc` exec-driver -(`docker -d --exec-driver=lxc`) then the operator can also specify LXC options +(`docker daemon --exec-driver=lxc`) then the operator can also specify LXC options using one or more `--lxc-conf` parameters. These can be new parameters or override existing parameters from the [lxc-template.go]( https://github.com/docker/docker/blob/master/daemon/execdriver/lxc/lxc_template.go). diff --git a/experimental/network_overlay.md b/experimental/network_overlay.md index f3427b4c9b..9827d993b7 100644 --- a/experimental/network_overlay.md +++ b/experimental/network_overlay.md @@ -8,7 +8,7 @@ Using `libkv`, the user can plug any of the supported Key-Value store (such as c User can specify the Key-Value store of choice using the `--kv-store` daemon flag, which takes configuration value of format `PROVIDER:URL`, where `PROVIDER` is the name of the Key-Value store (such as consul, etcd or zookeeper) and `URL` is the url to reach the Key-Value store. -Example : `docker -d --kv-store=consul:localhost:8500` +Example : `docker daemon --kv-store=consul:localhost:8500` Send us feedback and comments on [#14083](https://github.com/docker/docker/issues/14083) or on the usual Google Groups (docker-user, docker-dev) and IRC channels. diff --git a/experimental/networking.md b/experimental/networking.md index 4b6610cfbe..89d988bd03 100644 --- a/experimental/networking.md +++ b/experimental/networking.md @@ -73,7 +73,7 @@ Docker daemon supports a configuration flag `--default-network` which takes conf `NETWORK` is the name of the network created using the `docker network create` command When a container is created and if the network mode (`--net`) is not specified, then this default network will be used to connect the container. If `--default-network` is not specified, the default network will be the `bridge` driver. -Example : `docker -d --default-network=overlay:multihost` +Example : `docker daemon --default-network=overlay:multihost` ## Using Services diff --git a/hack/release.sh b/hack/release.sh index b56d69e881..5765a12d4a 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -327,7 +327,7 @@ release_binaries() { # To install, run the following command as root: curl -sSL -O $(s3_url)/builds/Linux/x86_64/docker-$VERSION && chmod +x docker-$VERSION && sudo mv docker-$VERSION /usr/local/bin/docker # Then start docker in daemon mode: -sudo /usr/local/bin/docker -d +sudo /usr/local/bin/docker daemon EOF # Add redirect at /builds/info for URL-backwards-compatibility diff --git a/man/docker.1.md b/man/docker.1.md index 898ff08a56..dd38d74a50 100644 --- a/man/docker.1.md +++ b/man/docker.1.md @@ -359,7 +359,7 @@ feature include: automatic or interactive thin-pool resize support, dynamically changing thin-pool features, automatic thinp metadata checking when lvm activates the thin-pool, etc. -Example use: `docker -d --storage-opt dm.thinpooldev=/dev/mapper/thin-pool` +Example use: `docker daemon --storage-opt dm.thinpooldev=/dev/mapper/thin-pool` #### dm.basesize @@ -378,26 +378,26 @@ value requires additional steps to take effect: $ sudo rm -rf /var/lib/docker $ sudo service docker start -Example use: `docker -d --storage-opt dm.basesize=20G` +Example use: `docker daemon --storage-opt dm.basesize=20G` #### dm.fs Specifies the filesystem type to use for the base device. The supported options are `ext4` and `xfs`. The default is `ext4`. -Example use: `docker -d --storage-opt dm.fs=xfs` +Example use: `docker daemon --storage-opt dm.fs=xfs` #### dm.mkfsarg Specifies extra mkfs arguments to be used when creating the base device. -Example use: `docker -d --storage-opt "dm.mkfsarg=-O ^has_journal"` +Example use: `docker daemon --storage-opt "dm.mkfsarg=-O ^has_journal"` #### dm.mountopt Specifies extra mount options used when mounting the thin devices. -Example use: `docker -d --storage-opt dm.mountopt=nodiscard` +Example use: `docker daemon --storage-opt dm.mountopt=nodiscard` #### dm.use_deferred_removal @@ -415,7 +415,7 @@ the container exit still succeeds and this option causes the system to schedule the device for deferred removal. It does not wait in a loop trying to remove a busy device. -Example use: `docker -d --storage-opt dm.use_deferred_removal=true` +Example use: `docker daemon --storage-opt dm.use_deferred_removal=true` #### dm.loopdatasize @@ -426,7 +426,7 @@ Specifies the size to use when creating the loopback file for the 100G. The file is sparse, so it will not initially take up this much space. -Example use: `docker -d --storage-opt dm.loopdatasize=200G` +Example use: `docker daemon --storage-opt dm.loopdatasize=200G` #### dm.loopmetadatasize @@ -437,7 +437,7 @@ Specifies the size to use when creating the loopback file for the is 2G. The file is sparse, so it will not initially take up this much space. -Example use: `docker -d --storage-opt dm.loopmetadatasize=4G` +Example use: `docker daemon --storage-opt dm.loopmetadatasize=4G` #### dm.datadev @@ -460,7 +460,7 @@ deprecated. Specifies a custom blocksize to use for the thin pool. The default blocksize is 64K. -Example use: `docker -d --storage-opt dm.blocksize=512K` +Example use: `docker daemon --storage-opt dm.blocksize=512K` #### dm.blkdiscard @@ -474,7 +474,7 @@ times, but it also prevents the space used in `/var/lib/docker` directory from being returned to the system for other use when containers are removed. -Example use: `docker -d --storage-opt dm.blkdiscard=false` +Example use: `docker daemon --storage-opt dm.blkdiscard=false` #### dm.override_udev_sync_check @@ -503,7 +503,7 @@ failures, see To allow the `docker` daemon to start, regardless of whether `udev` sync is `false`, set `dm.override_udev_sync_check` to true: - $ docker -d --storage-opt dm.override_udev_sync_check=true + $ docker daemon --storage-opt dm.override_udev_sync_check=true When this value is `true`, the driver continues and simply warns you the errors are happening. diff --git a/opts/opts.go b/opts/opts.go index 115ed5783b..398b8b4f37 100644 --- a/opts/opts.go +++ b/opts/opts.go @@ -15,9 +15,9 @@ import ( var ( alphaRegexp = regexp.MustCompile(`[a-zA-Z]`) 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*$`) - // DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. docker -d -H tcp://:8080 + // DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. docker daemon -H tcp://:8080 DefaultHTTPHost = "127.0.0.1" - // DefaultHTTPPort Default HTTP Port used if only the protocol is provided to -H flag e.g. docker -d -H tcp:// + // DefaultHTTPPort Default HTTP Port used if only the protocol is provided to -H flag e.g. docker daemon -H tcp:// // TODO Windows. DefaultHTTPPort is only used on Windows if a -H parameter // is not supplied. A better longer term solution would be to use a named // pipe as the default on the Windows daemon. diff --git a/project/PACKAGERS.md b/project/PACKAGERS.md index 6a540c28cf..22f24b4789 100644 --- a/project/PACKAGERS.md +++ b/project/PACKAGERS.md @@ -315,7 +315,7 @@ appropriate for your distro's init script to live there too!). In general, Docker should be run as root, similar to the following: ```bash -docker -d +docker daemon ``` Generally, a `DOCKER_OPTS` variable of some kind is available for adding more