mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Update docker daemon to dockerd
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
This commit is contained in:
		
							parent
							
								
									d1dfc1a5ef
								
							
						
					
					
						commit
						62cc802f61
					
				
					 10 changed files with 14 additions and 16 deletions
				
			
		| 
						 | 
				
			
			@ -31,7 +31,7 @@ stop on runlevel [!2345]
 | 
			
		|||
respawn
 | 
			
		||||
 | 
			
		||||
script
 | 
			
		||||
    /usr/bin/docker daemon -H=tcp://0.0.0.0:2375
 | 
			
		||||
    /usr/bin/dockerd -H=tcp://0.0.0.0:2375
 | 
			
		||||
end script
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,7 +21,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 daemon -e windows`
 | 
			
		||||
// to the docker daemon when you launch it with say: `dockerd -e windows`
 | 
			
		||||
type Config struct {
 | 
			
		||||
	CommonConfig
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -88,7 +88,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 daemon --storage-opt dm.foo=bar`.
 | 
			
		||||
This uses the `dm` prefix and would be used something like `dockerd --storage-opt dm.foo=bar`.
 | 
			
		||||
 | 
			
		||||
These options are currently documented both in [the man
 | 
			
		||||
page](../../../man/docker.1.md) and in [the online
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -715,7 +715,7 @@ with the `--exec-opt` flag. All the flag's options have the `native` prefix. A
 | 
			
		|||
single `native.cgroupdriver` option is available.
 | 
			
		||||
 | 
			
		||||
The `native.cgroupdriver` option specifies the management of the container's
 | 
			
		||||
cgroups. You can specify only specify `cgroupfs` or `systemd`. If you specify
 | 
			
		||||
cgroups. You can only specify `cgroupfs` or `systemd`. If you specify
 | 
			
		||||
`systemd` and it is not available, the system errors out. If you omit the
 | 
			
		||||
`native.cgroupdriver` option,` cgroupfs` is used.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -730,8 +730,8 @@ Setting this option applies to all containers the daemon launches.
 | 
			
		|||
Also Windows Container makes use of `--exec-opt` for special purpose. Docker user
 | 
			
		||||
can specify default container isolation technology with this, for example:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo dockerd --exec-opt isolation=hyperv
 | 
			
		||||
```console
 | 
			
		||||
> dockerd --exec-opt isolation=hyperv
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Will make `hyperv` the default isolation technology on Windows. If no isolation
 | 
			
		||||
| 
						 | 
				
			
			@ -746,14 +746,12 @@ To set the DNS server for all Docker containers, use:
 | 
			
		|||
$ sudo dockerd --dns 8.8.8.8
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
To set the DNS search domain for all Docker containers, use:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo dockerd --dns-search example.com
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Insecure registries
 | 
			
		||||
 | 
			
		||||
Docker considers a private registry either secure or insecure. In the rest of
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -188,7 +188,7 @@ if [ $ec -eq 0 ]; then
 | 
			
		|||
FROM docker:$COMMITHASH
 | 
			
		||||
RUN hack/make.sh binary
 | 
			
		||||
RUN cp bundles/latest/binary/docker /bin/docker 
 | 
			
		||||
CMD docker daemon -D -H tcp://0.0.0.0:$port_inner $daemon_extra_args
 | 
			
		||||
CMD dockerd -D -H tcp://0.0.0.0:$port_inner $daemon_extra_args
 | 
			
		||||
EOF
 | 
			
		||||
	else
 | 
			
		||||
		set -x
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,7 @@ import (
 | 
			
		|||
)
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	// DefaultHTTPPort Default HTTP Port used if only the protocol is provided to -H flag e.g. docker daemon -H tcp://
 | 
			
		||||
	// DefaultHTTPPort Default HTTP Port used if only the protocol is provided to -H flag e.g. dockerd -H tcp://
 | 
			
		||||
	// These are the IANA registered port numbers for use with Docker
 | 
			
		||||
	// see http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=docker
 | 
			
		||||
	DefaultHTTPPort = 2375 // Default HTTP Port
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,5 +2,5 @@
 | 
			
		|||
 | 
			
		||||
package opts
 | 
			
		||||
 | 
			
		||||
// DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. docker daemon -H tcp://:8080
 | 
			
		||||
// DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. dockerd -H tcp://:8080
 | 
			
		||||
const DefaultHTTPHost = "localhost"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,5 +52,5 @@ package opts
 | 
			
		|||
// to the delay if a user were to do 'docker run -H=tcp://localhost:2375...'
 | 
			
		||||
// explicitly.
 | 
			
		||||
 | 
			
		||||
// DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. docker daemon -H tcp://:8080
 | 
			
		||||
// DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. dockerd -H tcp://:8080
 | 
			
		||||
const DefaultHTTPHost = "127.0.0.1"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,7 @@ the address Docker uses to advertise the node using the `--cluster-advertise`
 | 
			
		|||
flag.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ docker daemon -H=<node_ip:2376> --cluster-advertise=<node_ip:2376> --cluster-store etcd://<etcd_ip1>,<etcd_ip2>/<path>
 | 
			
		||||
$ dockerd -H=<node_ip:2376> --cluster-advertise=<node_ip:2376> --cluster-store etcd://<etcd_ip1>,<etcd_ip2>/<path>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Using consul
 | 
			
		||||
| 
						 | 
				
			
			@ -27,7 +27,7 @@ the address Docker uses to advertise the node using the `--cluster-advertise`
 | 
			
		|||
flag.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ docker daemon -H=<node_ip:2376> --cluster-advertise=<node_ip:2376> --cluster-store consul://<consul_ip>/<path>
 | 
			
		||||
$ dockerd -H=<node_ip:2376> --cluster-advertise=<node_ip:2376> --cluster-store consul://<consul_ip>/<path>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Using zookeeper
 | 
			
		||||
| 
						 | 
				
			
			@ -37,5 +37,5 @@ the address Docker uses to advertise the node using the `--cluster-advertise`
 | 
			
		|||
flag.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ docker daemon -H=<node_ip:2376> --cluster-advertise=<node_ip:2376> --cluster-store zk://<zk_addr1>,<zk_addr2>/<path>
 | 
			
		||||
$ dockerd -H=<node_ip:2376> --cluster-advertise=<node_ip:2376> --cluster-store zk://<zk_addr1>,<zk_addr2>/<path>
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -292,7 +292,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 daemon
 | 
			
		||||
dockerd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Generally, a `DOCKER_OPTS` variable of some kind is available for adding more
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue