Deprecate --graph flag; Replace with --data-root

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
This commit is contained in:
Josh Hawn 2016-11-21 22:17:24 -08:00 committed by Tibor Vass
parent 578a431fb3
commit 804858fc6f
5 changed files with 27 additions and 14 deletions

View File

@ -1936,6 +1936,7 @@ _docker_daemon() {
--cluster-store-opt --cluster-store-opt
--config-file --config-file
--containerd --containerd
--data-root
--default-gateway --default-gateway
--default-gateway-v6 --default-gateway-v6
--default-shm-size --default-shm-size
@ -1947,7 +1948,6 @@ _docker_daemon() {
--exec-root --exec-root
--fixed-cidr --fixed-cidr
--fixed-cidr-v6 --fixed-cidr-v6
--graph -g
--group -G --group -G
--init-path --init-path
--insecure-registry --insecure-registry
@ -2016,7 +2016,7 @@ _docker_daemon() {
_filedir _filedir
return return
;; ;;
--exec-root|--graph|-g) --exec-root|--data-root)
_filedir -d _filedir -d
return return
;; ;;

View File

@ -2605,6 +2605,7 @@ __docker_subcommand() {
"($help)*--cluster-store-opt=[Cluster store options]:Cluster options:->cluster-store-options" \ "($help)*--cluster-store-opt=[Cluster store options]:Cluster options:->cluster-store-options" \
"($help)--config-file=[Path to daemon configuration file]:Config File:_files" \ "($help)--config-file=[Path to daemon configuration file]:Config File:_files" \
"($help)--containerd=[Path to containerd socket]:socket:_files -g \"*.sock\"" \ "($help)--containerd=[Path to containerd socket]:socket:_files -g \"*.sock\"" \
"($help)--data-root=[Root directory of persisted Docker data]:path:_directories" \
"($help -D --debug)"{-D,--debug}"[Enable debug mode]" \ "($help -D --debug)"{-D,--debug}"[Enable debug mode]" \
"($help)--default-gateway[Container default gateway IPv4 address]:IPv4 address: " \ "($help)--default-gateway[Container default gateway IPv4 address]:IPv4 address: " \
"($help)--default-gateway-v6[Container default gateway IPv6 address]:IPv6 address: " \ "($help)--default-gateway-v6[Container default gateway IPv6 address]:IPv6 address: " \
@ -2620,7 +2621,6 @@ __docker_subcommand() {
"($help)--fixed-cidr=[IPv4 subnet for fixed IPs]:IPv4 subnet: " \ "($help)--fixed-cidr=[IPv4 subnet for fixed IPs]:IPv4 subnet: " \
"($help)--fixed-cidr-v6=[IPv6 subnet for fixed IPs]:IPv6 subnet: " \ "($help)--fixed-cidr-v6=[IPv6 subnet for fixed IPs]:IPv6 subnet: " \
"($help -G --group)"{-G=,--group=}"[Group for the unix socket]:group:_groups" \ "($help -G --group)"{-G=,--group=}"[Group for the unix socket]:group:_groups" \
"($help -g --graph)"{-g=,--graph=}"[Root of the Docker runtime]:path:_directories" \
"($help -H --host)"{-H=,--host=}"[tcp://host:port to bind/connect to]:host: " \ "($help -H --host)"{-H=,--host=}"[tcp://host:port to bind/connect to]:host: " \
"($help)--icc[Enable inter-container communication]" \ "($help)--icc[Enable inter-container communication]" \
"($help)--init[Run an init inside containers to forward signals and reap processes]" \ "($help)--init[Run an init inside containers to forward signals and reap processes]" \

View File

@ -20,6 +20,16 @@ The following list of features are deprecated in Engine.
To learn more about Docker Engine's deprecation policy, To learn more about Docker Engine's deprecation policy,
see [Feature Deprecation Policy](https://docs.docker.com/engine/#feature-deprecation-policy). see [Feature Deprecation Policy](https://docs.docker.com/engine/#feature-deprecation-policy).
### `-g` and `--graph` flags on `dockerd`
**Deprecated In Release: v1.14.0**
**Target For Removal In Release: v1.17**
The `-g` or `--graph` flag for the `dockerd` or `docker daemon` command was
used to indicate the directory in which to store persistent data and resource
configuration and has been replaced with the more descriptive `--data-root`
flag.
### Top-level network properties in NetworkSettings ### Top-level network properties in NetworkSettings

View File

@ -35,6 +35,7 @@ Options:
--containerd string Path to containerd socket --containerd string Path to containerd socket
--cpu-rt-period int Limit the CPU real-time period in microseconds --cpu-rt-period int Limit the CPU real-time period in microseconds
--cpu-rt-runtime int Limit the CPU real-time runtime in microseconds --cpu-rt-runtime int Limit the CPU real-time runtime in microseconds
--data-root string Root directory of persistent Docker state (default "/var/lib/docker")
-D, --debug Enable debug mode -D, --debug Enable debug mode
--default-gateway ip Container default gateway IPv4 address --default-gateway ip Container default gateway IPv4 address
--default-gateway-v6 ip Container default gateway IPv6 address --default-gateway-v6 ip Container default gateway IPv6 address
@ -49,7 +50,6 @@ Options:
--experimental Enable experimental features --experimental Enable experimental features
--fixed-cidr string IPv4 subnet for fixed IPs --fixed-cidr string IPv4 subnet for fixed IPs
--fixed-cidr-v6 string IPv6 subnet for fixed IPs --fixed-cidr-v6 string IPv6 subnet for fixed IPs
-g, --graph string Root of the Docker runtime (default "/var/lib/docker")
-G, --group string Group for the unix socket (default "docker") -G, --group string Group for the unix socket (default "docker")
--help Print usage --help Print usage
-H, --host list Daemon socket(s) to connect to (default []) -H, --host list Daemon socket(s) to connect to (default [])
@ -1139,6 +1139,7 @@ This is a full example of the allowed configuration options on Linux:
```json ```json
{ {
"authorization-plugins": [], "authorization-plugins": [],
"data-root": "",
"dns": [], "dns": [],
"dns-opts": [], "dns-opts": [],
"dns-search": [], "dns-search": [],
@ -1153,7 +1154,6 @@ This is a full example of the allowed configuration options on Linux:
"log-opts": {}, "log-opts": {},
"mtu": 0, "mtu": 0,
"pidfile": "", "pidfile": "",
"graph": "",
"cluster-store": "", "cluster-store": "",
"cluster-store-opts": {}, "cluster-store-opts": {},
"cluster-advertise": "", "cluster-advertise": "",
@ -1232,6 +1232,7 @@ This is a full example of the allowed configuration options on Windows:
```json ```json
{ {
"authorization-plugins": [], "authorization-plugins": [],
"data-root": "",
"dns": [], "dns": [],
"dns-opts": [], "dns-opts": [],
"dns-search": [], "dns-search": [],
@ -1243,7 +1244,6 @@ This is a full example of the allowed configuration options on Windows:
"log-driver": "", "log-driver": "",
"mtu": 0, "mtu": 0,
"pidfile": "", "pidfile": "",
"graph": "",
"cluster-store": "", "cluster-store": "",
"cluster-advertise": "", "cluster-advertise": "",
"max-concurrent-downloads": 3, "max-concurrent-downloads": 3,
@ -1321,7 +1321,7 @@ The following daemon options must be configured for each daemon:
```none ```none
-b, --bridge= Attach containers to a network bridge -b, --bridge= Attach containers to a network bridge
--exec-root=/var/run/docker Root of the Docker execdriver --exec-root=/var/run/docker Root of the Docker execdriver
-g, --graph=/var/lib/docker Root of the Docker runtime --data-root=/var/lib/docker Root of persisted Docker data
-p, --pidfile=/var/run/docker.pid Path to use for daemon PID file -p, --pidfile=/var/run/docker.pid Path to use for daemon PID file
-H, --host=[] Daemon socket(s) to connect to -H, --host=[] Daemon socket(s) to connect to
--iptables=true Enable addition of iptables rules --iptables=true Enable addition of iptables rules
@ -1338,8 +1338,9 @@ It is very important to properly understand the meaning of those options and to
If you are not using the default, you must create and configure the bridge manually or just set it to 'none': `--bridge=none` If you are not using the default, you must create and configure the bridge manually or just set it to 'none': `--bridge=none`
- `--exec-root` is the path where the container state is stored. The default value is `/var/run/docker`. Specify the path for - `--exec-root` is the path where the container state is stored. The default value is `/var/run/docker`. Specify the path for
your running daemon here. your running daemon here.
- `--graph` is the path where images are stored. The default value is `/var/lib/docker`. To avoid any conflict with other daemons - `--data-root` is the path where persisted data such as images, volumes, and
set this parameter separately for each daemon. cluster state are stored. The default value is `/var/lib/docker`. To avoid any
conflict with other daemons, set this parameter separately for each daemon.
- `-p, --pidfile=/var/run/docker.pid` is the path where the process ID of the daemon is stored. Specify the path for your - `-p, --pidfile=/var/run/docker.pid` is the path where the process ID of the daemon is stored. Specify the path for your
pid file here. pid file here.
- `--host=[]` specifies where the Docker daemon will listen for client connections. If unspecified, it defaults to `/var/run/docker.sock`. - `--host=[]` specifies where the Docker daemon will listen for client connections. If unspecified, it defaults to `/var/run/docker.sock`.
@ -1365,6 +1366,6 @@ $ sudo dockerd \
--iptables=false \ --iptables=false \
--ip-masq=false \ --ip-masq=false \
--bridge=none \ --bridge=none \
--graph=/var/lib/docker-bootstrap \ --data-root=/var/lib/docker-bootstrap \
--exec-root=/var/run/docker-bootstrap --exec-root=/var/run/docker-bootstrap
``` ```

View File

@ -17,6 +17,7 @@ dockerd - Enable daemon mode
[**--cluster-store-opt**[=*map[]*]] [**--cluster-store-opt**[=*map[]*]]
[**--config-file**[=*/etc/docker/daemon.json*]] [**--config-file**[=*/etc/docker/daemon.json*]]
[**--containerd**[=*SOCKET-PATH*]] [**--containerd**[=*SOCKET-PATH*]]
[**--data-root**[=*/var/lib/docker*]]
[**-D**|**--debug**] [**-D**|**--debug**]
[**--default-gateway**[=*DEFAULT-GATEWAY*]] [**--default-gateway**[=*DEFAULT-GATEWAY*]]
[**--default-gateway-v6**[=*DEFAULT-GATEWAY-V6*]] [**--default-gateway-v6**[=*DEFAULT-GATEWAY-V6*]]
@ -33,7 +34,6 @@ dockerd - Enable daemon mode
[**--fixed-cidr**[=*FIXED-CIDR*]] [**--fixed-cidr**[=*FIXED-CIDR*]]
[**--fixed-cidr-v6**[=*FIXED-CIDR-V6*]] [**--fixed-cidr-v6**[=*FIXED-CIDR-V6*]]
[**-G**|**--group**[=*docker*]] [**-G**|**--group**[=*docker*]]
[**-g**|**--graph**[=*/var/lib/docker*]]
[**-H**|**--host**[=*[]*]] [**-H**|**--host**[=*[]*]]
[**--help**] [**--help**]
[**--icc**[=*true*]] [**--icc**[=*true*]]
@ -152,6 +152,11 @@ $ sudo dockerd --add-runtime runc=runc --add-runtime custom=/usr/local/bin/my-ru
**--containerd**="" **--containerd**=""
Path to containerd socket. Path to containerd socket.
**--data-root**=""
Path to the directory used to store persisted Docker data such as
configuration for resources, swarm cluster state, and filesystem data for
images, containers, and local volumes. Default is `/var/lib/docker`.
**-D**, **--debug**=*true*|*false* **-D**, **--debug**=*true*|*false*
Enable debug mode. Default is false. Enable debug mode. Default is false.
@ -204,9 +209,6 @@ $ sudo dockerd --add-runtime runc=runc --add-runtime custom=/usr/local/bin/my-ru
Group to assign the unix socket specified by -H when running in daemon mode. Group to assign the unix socket specified by -H when running in daemon mode.
use '' (the empty string) to disable setting of a group. Default is `docker`. use '' (the empty string) to disable setting of a group. Default is `docker`.
**-g**, **--graph**=""
Path to use as the root of the Docker runtime. Default is `/var/lib/docker`.
**-H**, **--host**=[*unix:///var/run/docker.sock*]: tcp://[host:port] to bind or **-H**, **--host**=[*unix:///var/run/docker.sock*]: tcp://[host:port] to bind or
unix://[/path/to/socket] to use. unix://[/path/to/socket] to use.
The socket(s) to bind to in daemon mode specified using one or more The socket(s) to bind to in daemon mode specified using one or more