Commit Graph

73 Commits

Author SHA1 Message Date
Brian Goff 20bcf49fb6 Add option to auto-configure blkdev for devmapper
Instead of forcing users to manually configure a block device to use
with devmapper, this gives the user the option to let the devmapper
driver configure a device for them.

Adds several new options to the devmapper storage-opts:

- dm.directlvm_device="" - path to the block device to configure for
  direct-lvm
- dm.thinp_percent=95 - sets the percentage of space to use for
  storage from the passed in block device
- dm.thinp_metapercent=1 - sets the percentage of space to for metadata
  storage from the passed in block device
- dm.thinp_autoextend_threshold=80 - sets the threshold for when `lvm`
  should automatically extend the thin pool as a percentage of the total
  storage space
- dm.thinp_autoextend_percent=20 - sets the percentage to increase the
  thin pool by when an autoextend is triggered.

Defaults are taken from
[here](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/#/configure-direct-lvm-mode-for-production)

The only option that is required is `dm.directlvm_device` for docker to
set everything up.

Changes to these settings are not currently supported and will error
out.
Future work could support allowing changes to these values.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-02 00:11:04 +00:00
Brian Goff 297dc42dff Add no-new-privileg flag
The daemon config for defaulting to no-new-privileges for containers was
added in d7fda019bb7e24f42f8ae1ddecb3fd52df3c48bf, but somehow we
managed to omit the flag itself, but also documented the flag.
This just adds the actual flag.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-02 00:11:04 +00:00
David Sheets 24b6f3cd6e docs/dockerd: correct authz plugin chain semantics
Signed-off-by: David Sheets <dsheets@docker.com>
2017-06-02 00:11:04 +00:00
Alvin Deng 65cf6dd611 Update dockerd.md
Signed-off-by: Alvin Deng <alvin.q.deng@utexas.edu>
2017-06-02 00:11:03 +00:00
Alvin Deng d2295d58b2 Add examples of storage-opts and log-opts for the daemon
Signed-off-by: Alvin Deng <alvin.q.deng@utexas.edu>
2017-06-02 00:11:03 +00:00
Josh Hawn 804858fc6f Deprecate --graph flag; Replace with --data-root
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2017-06-02 00:11:01 +00:00
Misty Stanley-Jones 2e9e71f59a Update docs for experimental features
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:11:00 +00:00
Harald Albers 48332a6aeb Remove docs for `dockerd --no-new-privileges`
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:57 +00:00
Harald Albers e66bc57039 Clarify why `hosts` in `daemon.json` does not work
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:10:55 +00:00
yupengzte 6f3f9e384c fix the type
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-06-02 00:10:55 +00:00
Daniel Zhang 218740abc7 Add daemon flag to set no_new_priv as default for unprivileged containers.
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
2017-06-02 00:10:55 +00:00
Misty Stanley-Jones ddadd3db49 Standardized formatting of CLI reference commands
Command name should be a H1

Only Description, Examples, and Related Commands should be H2

Changed 'Related information' heading to 'Related commands' since 99% it is only linking commands

Added some examples where relevant

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-06-02 00:10:53 +00:00
Lewis Daly 50d1d4ecba Updated dockerd docs with note about user namespaces
Signed-off-by: Lewis Daly <lewisdaly@me.com>

Updated uid/gid reference to be more canonical - and signed commit

Signed-off-by: Lewis Daly <lewisdaly@me.com>

Editorial suggestion

I tried my hand at rewriting this a bit for readability. Can you please verify that the facts are correct, especially about the permission changes? You can feel free to squash my commit with yours so that it's signed. You'll need to pull the change from your fork to work on it locally.

Editorial suggestion

I tried my hand at rewriting this a bit for readability. Can you please verify that the facts are correct, especially about the permission changes? You can feel free to squash my commit with yours so that it's signed. You'll need to pull the change from your fork to work on it locally.
2017-06-02 00:10:52 +00:00
Yong Tang 205ebd8d30 Add daemon option --default-shm-size
This fix fixes issue raised in 29492 where it was not
possible to specify a default `--default-shm-size` in daemon
configuration for each `docker run``.

The flag `--default-shm-size` which is reloadable, has been
added to the daemon configuation.
Related docs has been updated.

This fix fixes 29492.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:10:52 +00:00
allencloud 6c3e0ba560 support registry mirror config reload
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-06-02 00:10:47 +00:00
yuexiao-wang 6dcebccc46 Update docker daemon to dockerd
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-06-02 00:10:47 +00:00
zhenghenghuo a724a5d8c9 fix some typos
Signed-off-by: zhenghenghuo <zhenghenghuo@zju.edu.cn>

try to pass test

Signed-off-by: zhenghenghuo <zhenghenghuo@zju.edu.cn>

try to pass the test

Signed-off-by: zhenghenghuo <zhenghenghuo@zju.edu.cn>
2017-06-02 00:10:46 +00:00
Zhang Wei ef5fb30f61 Add missing "--default-runtime" flag in manpage
Add missing flag and more descriptions in manpage.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2017-06-02 00:10:46 +00:00
yuexiao-wang eff40eda38 Add options for docker plugin enable and fix some typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-06-02 00:10:40 +00:00
Ben Firshman 2cfcc8a8fa Rename Remote API to Engine API
Implementation of https://github.com/docker/docker/issues/28319

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2017-06-02 00:10:40 +00:00
bbayani d6d3f5144c Clarify that ipmasq rules are not added when iptables is false
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-06-02 00:10:39 +00:00
bbayani 00f00e726e Updated daemon documentation to clarify that live-restore is not suppoted on windows
Review comment implementation

Signed-off-by: bbayani <bhumikabayani@gmail.com>
2017-06-02 00:10:38 +00:00
Antonio Murdaca 9ba2472a0b daemon: add a flag to override the default seccomp profile
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-02 00:10:32 +00:00
Gaetan de Villele 572c6bb89a fix frontmatter keywords value type (string, instead of []string) in /docs/reference
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-06-02 00:10:31 +00:00
yupeng af5af201fe Add for String
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2017-06-02 00:10:31 +00:00
Michael Crosby 94bc15016e Add metrics docs to cli reference
Fixes #27843

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-02 00:10:31 +00:00
Phil Estes c6c5d28828 Add "userns" to `docker info` security options output
If user namespaces is enabled on the daemon, reveal that via docker info
by adding "userns" to the list of security options reported by the
info endpoint.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-06-02 00:10:30 +00:00
Yong Tang 7b22b129b9 Update docs for dockerd.md about `max-concurrent-downloads/max-concurrent-uploads`
It seems that `max-concurrent-downloads` and `max-concurrent-uploads`
are supported in Windows for `config.json`. Though that was not
mentioned in the docs for dockerd.md.

This fix adds the following to the example `config.json` file for Windows:
```
    "max-concurrent-downloads": 3,
    "max-concurrent-uploads": 5,
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:10:30 +00:00
Kenfe-Mickael Laventure 47b507e48a Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-02 00:10:28 +00:00
yuexiao-wang f18c41ee83 Modify the links for docker container commands
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-06-02 00:10:27 +00:00
Misty Stanley-Jones 7f36c3a1a0 Sync docker/docker refs with files mistakenly edited in docker.github.io repo
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-06-02 00:10:26 +00:00
allencloud 9012efce15 support insecure registry in configuration reload
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-06-02 00:10:26 +00:00
Yong Tang ef158e3e0a Add config parameter to change stop timeout during daemon shutdown
This fix tries to add a daemon config parameter `--shutdown-timeout`
that specifies the timeout value to stop containers gracefully
(before SIGKILL). The default value is 15s.

The `--shutdown-timeout` parameter is added to daemon options and
config file. It will also be updated during daemon reload.

Additional test cases have been added to cover the change.

This fix fixes #22471.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:10:25 +00:00
Sebastiaan van Stijn 833db8ffac Remove Fedora 22 from RPM build as it is EOL
Fedora 22 reached end of life on July 19th, and
will no longer receive updates;

https://fedoramagazine.org/fedora-22-end-of-life-2016-july/

With the recent release of Fedora 24, Fedora 22 will officially enter End Of
Life (EOL) status on July 19th, 2016. After July 19th, all packages in the
Fedora 22 repositories will no longer receive security, bugfix, or enhancement
updates, and no new packages will be added to the Fedora 22 collection.

Upgrading to Fedora 23 or Fedora 24 before July 19th 2016 is highly recommended
for all users still running Fedora 22.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:10:24 +00:00
Misty Stanley-Jones 2845676cc2 Convert Markdown frontmatter to YAML
Some frontmatter such as the weights, menu stuff, etc is no longer used
'draft=true' becomes 'published: false'

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-06-02 00:10:24 +00:00
Sebastiaan van Stijn db0cbdff04 Improve --log-level help text
This information was added in
1efc940e6f547760e5e8f4648acb120ff19fdc58,
but removed again in
a271eaeba224652e3a12af0287afbae6f82a9333
to make the help-output fit in a 80-chars
terminal.

This adds the available options again
in the help output, and updates the CLI
reference documentation to match actual
output.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:10:13 +00:00
Antonio Murdaca e9cb71acbb daemon: add --userland-proxy-path flag
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-02 00:10:12 +00:00
Antonio Murdaca c17012948e configure docker-init binary path
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-02 00:10:12 +00:00
Michael Crosby d72deed554 Add init process for zombie fighting
This adds a small C binary for fighting zombies.  It is mounted under
`/dev/init` and is prepended to the args specified by the user.  You
enable it via a daemon flag, `dockerd --init`, as it is disable by
default for backwards compat.

You can also override the daemon option or specify this on a per
container basis with `docker run --init=true|false`.

You can test this by running a process like this as the pid 1 in a
container and see the extra zombie that appears in the container as it
is running.

```c

int main(int argc, char ** argv) {
	pid_t pid = fork();
	if (pid == 0) {
		pid = fork();
		if (pid == 0) {
			exit(0);
		}
		sleep(3);
		exit(0);
	}
	printf("got pid %d and exited\n", pid);
	sleep(20);
}
```

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-02 00:10:10 +00:00
Sebastiaan van Stijn 36ffab578f Use "sudo" for dockerd examples
Because we standardize on using a non-privileged
prompt (`$`) instead of `#`, replacing the
examples to use `sudo` instead to indicate
this has to be run as root.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:10:10 +00:00
Phil Estes cf8c2c21ac Remove --read-only restriction when user ns enabled
The restriction is no longer necessary given changes at the runc layer
related to mount options of the rootfs. Also cleaned up the docs on
restrictions left for userns enabled mode. Re-enabled tests related to
--read-only when testing a userns-enabled daemon in integration-cli.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2017-06-02 00:10:09 +00:00
Vivek Goyal 21e45b5ad9 devmapper: Provide a knob dm.xfs_nospace_max_retries
When xfs filesystem is being used on top of thin pool, xfs can get ENOSPC
errors from thin pool when thin pool is full. As of now xfs retries the
IO and keeps on retrying and does not give up. This can result in container
application being stuck for a very long time. In fact I have seen instances
of unkillable processes. So that means once thin pool is full and process
gets stuck, container can't be stopped/killed either and only option left
seems to be power recycle of the box.

In another instance, writer did not block but failed after a while. But
when I tried to exit/stop the container, unmounting xfs hanged and only
thing I could do was power cycle the machine.

Now upstream kernel has committed patches where it allows user space to
customize user space behavior in case of errors. One of the knobs is
max_retries, which specifies how many times an IO should be retried
when ENOSPC is encountered.

This patch sets provides a tunable knob (dm.xfs_nospace_max_retries) so
that user can specify value for max_retries and tune xfs behavior. If
one sets this value to 0, xfs will not retry IO when ENOSPC error is
encountered. It will instead give up and shutdown filesystem.

This knob can be useful if one is running into unkillable
processes/containers issue on top of xfs.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2017-06-02 00:10:08 +00:00
ohmystack fa710a059a Add docs for "--containerd" in dockerd
Signed-off-by: ohmystack <jiangjun1990@gmail.com>
2017-06-02 00:10:07 +00:00
yuexiao-wang ed38ec18bf Replace docker command from 'docker daemon' to 'dockerd'
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-06-02 00:10:06 +00:00
Michael Crosby 1ec3668e69 Replace old oci specs import with runtime-specs
Fixes #25804

The upstream repo changed the import paths.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-02 00:10:05 +00:00
Yong Tang 710f8d8dea Update docs so that log-opts takes map (`{}`) instead of `[]`
This fix updates docs so that log-opts takes map (`{}`) instead
of `[]`, as is defined in the impmenetation (`map[string]string`)

This fix fixes 22311.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:10:04 +00:00
Liron Levin e428a09ae7 Enable to dynamically reload authorization plugins via daemon.config
Following #22729, enable to dynamically reload/remove the daemon
authorization plugins (via standard reloading mechanism).
https://docs.docker.com/engine/reference/commandline/daemon/#daemon-
configuration-file

Daemon must store a reference to the authorization middleware to refresh
the plugin on configuration changes.

Signed-off-by: Liron Levin <liron@twistlock.com>
2017-06-02 00:10:04 +00:00
Charles Smith 2cab081e16 add doc for live-restore setting and daemonless containers, fix admin guide menu
Signed-off-by: Charles Smith <charles.smith@docker.com>
2017-06-02 00:10:03 +00:00
Aaron Lehmann 18cd5ac352 Split advertised address from listen address
There are currently problems with "swarm init" and "swarm join" when an
explicit --listen-addr flag is not provided. swarmkit defaults to
finding the IP address associated with the default route, and in cloud
setups this is often the wrong choice.

Introduce a notion of "advertised address", with the client flag
--advertise-addr, and the daemon flag --swarm-default-advertise-addr to
provide a default. The default listening address is now 0.0.0.0, but a
valid advertised address must be detected or specified.

If no explicit advertised address is specified, error out if there is
more than one usable candidate IP address on the system. This requires a
user to explicitly choose instead of letting swarmkit make the wrong
choice. For the purposes of this autodetection, we ignore certain
interfaces that are unlikely to be relevant (currently docker*).

The user is also required to choose a listen address on swarm init if
they specify an explicit advertise address that is a hostname or an IP
address that's not local to the system. This is a requirement for
overlay networking.

Also support specifying interface names to --listen-addr,
--advertise-addr, and the daemon flag --swarm-default-advertise-addr.
This will fail if the interface has multiple IP addresses (unless it has
a single IPv4 address and a single IPv6 address - then we resolve the
tie in favor of IPv4).

This change also exposes the node's externally-reachable address in
docker info, as requested by #24017.

Make corresponding API and CLI docs changes.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:10:02 +00:00
Sebastiaan van Stijn 27584ec78a fix duplicated usage in docs
this removes a copy/pasta whoopsie on my side,
introduced in de64324109d2694b1525e62b5c0072267282a36c

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:10:01 +00:00