mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #15445 from hqhq/hq_use_docker_daemon
Change all docker -d to docker daemon
This commit is contained in:
commit
51249a3aa0
15 changed files with 27 additions and 27 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue