Commit Graph

570 Commits

Author SHA1 Message Date
Sebastiaan van Stijn c33bc7d99e Remove shorthand flags for "mount", "pretty", and "no-resolve"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:50 +00:00
Michael Crosby e3f04f5d20 Add --oom-score-adjust to daemon
This adds an `--oom-score-adjust` flag to the daemon so that the value
provided can be set for the docker daemon's process.  The default value
for the flag is -500.  This will allow the docker daemon to have a
less chance of being killed before containers do.  The default value for
processes is 0 with a min/max of -1000/1000.

-500 is a good middle ground because it is less than the default for
most processes and still not -1000 which basically means never kill this
process in an OOM condition on the host machine.  The only processes on
my machine that have a score less than -500 are dbus at -900 and sshd
and xfce( my window manager ) at -1000.  I don't think docker should be
set lower, by default, than dbus or sshd so that is why I chose -500.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-02 00:07:50 +00:00
Vincent Demeester 2e844f5e8d Remove --command flag for service update
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-02 00:07:50 +00:00
Sebastiaan van Stijn dd1708d943 Make labels human readable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:50 +00:00
Mei ChunTao 17d3e6264a fix the docker run --readonly example. rename '/icanwrite here' to '/icanwrite/here'
Signed-off-by: Mei ChunTao <mei.chuntao@zte.com.cn>
2017-06-02 00:07:50 +00:00
Arnaud Porterie (icecrime) 253a5f4ea2 Rename `--net` to `--network`
Add a `--network` flag which replaces `--net` without deprecating it
yet. The `--net` flag remains hidden and supported.

Add a `--network-alias` flag which replaces `--net-alias` without deprecating
it yet. The `--net-alias` flag remains hidden and supported.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
2017-06-02 00:07:50 +00:00
Sebastiaan van Stijn b41c0c8696 Fix some broken sourceforge.net links
Looks like there's issues with sourceforge project
pages. Given that sourceforge isn't really what
it used to be, trying to find alternative URLs
where possible.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:50 +00:00
Sebastiaan van Stijn 9958abc17d Add "auto-accept=none" to documentation
The "none" option was not added to the documentation.
This adds an example, and adds additional information
on manually accepting or rejecting a node.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:50 +00:00
Derek McGowan 48e659e30c Allow option to override kernel check in overlay2
Add option to skip kernel check for older kernels which have been patched to support multiple lower directories in overlayfs.

Fixes #24023

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-06-02 00:07:49 +00:00
johnharris85 2f3e095768 Add support for comma-separated --auto-accept syntax.
Signed-off-by: John Harris <john@johnharris.io>
2017-06-02 00:07:49 +00:00
Qiang Huang 670a0b8077 Soften limitation of update kernel memory
Kernel memory is not allowed to be updated if container is
running, it's not actually a precise kernel limitation.

Before kernel version 4.6, kernel memory will not be accounted
until kernel memory limit is set, if a container created with
kernel memory initialized, kernel memory is accounted as soon
as process created in container, so kernel memory limit update
is allowed afterward. If kernel memory is not initialized,
kernel memory consumed by processes in container will not be
accounted, so we can't update the limit because the account
will be wrong.

So update kernel memory of a running container with kernel memory
initialized is allowed, we should soften the limitation by docker.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-06-02 00:07:49 +00:00
Dave Henderson e8b87f53ec Clarify warning against using build-time variables for secrets
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2017-06-02 00:07:49 +00:00
Charles Smith bf31e188d9 add constraint to service create ref
Signed-off-by: Charles Smith <charles.smith@docker.com>
2017-06-02 00:07:49 +00:00
Sebastiaan van Stijn 59e2c57540 add iptables=false to docs for multiple daemons
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:49 +00:00
Vincent Demeester 3ebe3fe752 Updates on cli reference documentation
- Update ps with `--last` flag
- Update commands with current output
- Make sure hugo does not detect the wrong language
- Update usage for `tag` command to be more coherent with the other ones

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-02 00:07:49 +00:00
Aaron Lehmann e632408a37 Generate a swarm joining secret if none is specified
The current behavior of `docker swarm init` is to set up a swarm that
has no secret for joining, and does not require manual acceptance for
workers. Since workers may sometimes receive sensitive data such as pull
credentials, it makes sense to harden the defaults.

This change makes `docker swarm init` generate a random secret if none
is provided, and print it to the terminal. This secret will be needed to
join workers or managers to the swarm. In addition to improving access
control to the cluster, this setup removes an avenue for
denial-of-service attacks, since the secret is necessary to even create
an entry in the node list.

`docker swarm init --secret ""` will set up a swarm without a secret,
matching the old behavior. `docker swarm update --secret ""` removes the
automatically generated secret after `docker swarm init`.

Closes #23785

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:07:49 +00:00
Vincent Demeester de7c6a8355 Use "on-failure" for both containers and services
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-02 00:07:49 +00:00
Anil Madhavapeddy 20859b146b make `docker service --help` text for `--endpoint-mode` more consistent
Previously:

```
      --constraint value             Placement constraints (default [])
      --endpoint-mode string         Endpoint mode(Valid values: vip, dnsrr)
<snip>
      --restart-condition string     Restart when condition is met (none, on_failure, or any)
```

Now:

```
      --constraint value             Placement constraints (default [])
      --endpoint-mode string         Endpoint mode (vip or dnsrr)
<snip>
      --restart-condition string     Restart when condition is met (none, on_failure, or any)
```

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-06-02 00:07:49 +00:00
Yong Tang cab7139a4b Change NAME to HOSTNAME in docs for `docker node ls`
In #24159, the title field of `docker node ls` has been
changed from NAME to HOSTNAME. However, in the docs the
NAMEs are still used for the output of `docker node ls`.

This fix updates docs so that NAME field is changed to
HOSTNAME for all `docker node ls`.

This fix is related to #24159 and #24090.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:48 +00:00
Otto Kekäläinen 8e2c3efc58 Fix spelling in comments, strings and documentation
Signed-off-by: Otto Kekäläinen <otto@seravo.fi>
2017-06-02 00:07:48 +00:00
Antonio Murdaca fac7c67349 man: add missing --add-runtime
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-02 00:07:48 +00:00
Adolfo Ochagavía cbfebbb25a Fix typo
Signed-off-by: Adolfo Ochagavía <aochagavia92@gmail.com>
2017-06-02 00:07:48 +00:00
Sebastiaan van Stijn b4a798e983 fix typo in "readonly" flag in documentation
the flag is named '--read-only', not '--readonly'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:48 +00:00
Alan Thompson bd67dfdd33 Update network_create.md
minor typos and punctuation.

Signed-off-by: Alan Thompson <cloojure@gmail.com>
2017-06-02 00:07:47 +00:00
Aaron Lehmann ca0240f9c2 Fix --auto-accept documentation
The --auto-accept documentation currently says that both worker and
manager nodes are automatically accepted by default. Correct it.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:07:47 +00:00
Charles Smith a3b4cd7d99 add menu.md, make index.md command line reference, update typos/minor errors in cli docs
Signed-off-by: Charles Smith <charles.smith@docker.com>
2017-06-02 00:07:47 +00:00
Sebastiaan van Stijn b9505045d9 rename desired_state filter to desired-state
For consistency with other filters (such as
"is-official"), this renames the desired_state
filter to "desired-state".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:47 +00:00
Nicola Kabar f68b707d60 [Docs] clarified local volume driver docs
Signed-off-by: Nico <nicolaka@gmail.com>
2017-06-02 00:07:47 +00:00
Aaron Lehmann 4721039d71 Add documentation for external CA features in API/CLI
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:07:47 +00:00
allencloud a03b5522fe make cmd short short consistency and change docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-06-02 00:07:47 +00:00
Harald Albers 77d6b3721e add documentation for desired_state filter
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:07:47 +00:00
allencloud a9fcf23fb9 uppercase output in node inspect to keep consistency
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-06-02 00:07:47 +00:00
Serhat Gülçiçek beb09f42d6 Fix error for env variables example in docker reference - 2
The reason why the issue occurs is because sh parses the first argument after -c as the whole script to execute.
Everything after isn't executed as one might expect.

When working on the 'fix' I found out the same fix is also done in commit 2af7c5cfe24b4c8e931f751979b5e69e20ba77e2, except only for one occurrence.

Signed-off-by: Serhat Gülçiçek <serhat+signoff@equil.nl>
2017-06-02 00:07:47 +00:00
orkaa d2f61188f1 For the lulz! (evalulate -> evaluate)
Signed-off-by: orkaa <orkica@gmail.com>
2017-06-02 00:07:46 +00:00
Neil Peterson 32054251c7 Added daemon.json Windows example
Signed-off-by: Neil Peterson <neilpeterson@outlook.com>
2017-06-02 00:07:46 +00:00
Shishir Mahajan 94b45e398f PR 19367 doc change: Mention supported drivers for --storage-opt size option in docker create/run.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2017-06-02 00:07:45 +00:00
Charles Smith 87591ae9b7 update docker swarm cli
Signed-off-by: Charles Smith <charles.smith@docker.com>
2017-06-02 00:07:45 +00:00
Sven Dowideit b6bfe363f8 Add the advisory=rc metadata
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:07:45 +00:00
Sebastiaan van Stijn 7b22dbd02a remove "RC" warning from Markdown files
A site-wide banner is going to be used, so we don't need this warning

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:45 +00:00
Charles Chan def6847e11 Update help output to match Docker 1.11.
* Also touch up headings.

Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
2017-06-02 00:07:45 +00:00
Sebastiaan van Stijn 03c9762fba Add initial "service" docs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:45 +00:00
Charles Smith a816f63e57 update output for node commands, minor edits
Signed-off-by: Charles Smith <charles.smith@docker.com>
2017-06-02 00:07:44 +00:00
Tonis Tiigi 308888a8c6 Add cert-expiry to swarm update
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-02 00:07:44 +00:00
Sebastiaan van Stijn 541dcf39ad Update docker info output example
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:44 +00:00
Sebastiaan van Stijn bfbf538f68 docs: move "advisory" to general metadata
the advisory option should not be
below "menu"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:44 +00:00
Arnaud Porterie (icecrime) 96150d3faa Make `--dispatcher-heartbeat-period` a duration
Make `--dispatcher-heartbeat-period` a duration in `docker swarm
update`, allowing to express the value as "5s", "1h", etc.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
2017-06-02 00:07:44 +00:00
Victor Vieux d8fee0b06e no more 'docker node reject' in docs
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-06-02 00:07:44 +00:00
Sebastiaan van Stijn 6c1739b80d docker plugin commandline reference
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:44 +00:00
Alessandro Boch 987e5e6d8a Allow user to specify container's link-local addresses
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-06-02 00:07:44 +00:00
Kenfe-Mickael Laventure 090cf185cd Add support for multiples runtimes
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-02 00:07:44 +00:00
Victoria Bialas d3b7a2779e surfacing Learn by example topics to top level of Docker Engine docs
fixing links after moving surfacing tutorials

fixing more links for the newly located tutorials

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
2017-06-02 00:07:43 +00:00
Amit Shukla 593ee1e29d CLI docs
Signed-off-by: Amit Shukla <amit.shukla@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-02 00:07:43 +00:00
Derek McGowan e7fa3c6279 Add documentation for using overlay2
Add mention in dockerd command line and storage driver selection documentation.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-06-02 00:07:43 +00:00
Shoubhik Bose 0a0bb19a33 Added example for using image digest in the docker run command
Signed-off-by: Shoubhik Bose <sbose78@gmail.com>

Added explanation for the example with image's digest ( as per @thaJeztah 's comment

Signed-off-by: Shoubhik Bose <sbose78@gmail.com>

Wrapped to ~80 chars

Signed-off-by: Shoubhik Bose <sbose78@gmail.com>
2017-06-02 00:07:43 +00:00
Charles Chan a443697846 Add link to Docker Hub.
* To make it consistent with similar references in other parts of document.

Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
2017-06-02 00:07:43 +00:00
Kevin Burke 26fdf31cf8 typo in builder.md: its => it's
Signed-off-by: Kevin Burke <kev@inburke.com>
2017-06-02 00:07:43 +00:00
Victoria Bialas 26e3227441 re-doing Docker Engine overview topics for v.1.12
fixed broken links created from Engine Overview update by adding missing topic to daemon reference page and updating the hrefs in the api pages

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
2017-06-02 00:07:42 +00:00
Vincent Demeester 478055c89c Update docker-load documentation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-02 00:07:42 +00:00
Sebastiaan van Stijn bb0afa7381 network docs cleanup
This fixes some Markup and formatting
issues in the network documentation;

- wrap text to 80 chars
- add missing language hints for code examples
- add missing line continuations (\)
- update USAGE output for Cobra

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:42 +00:00
Sebastiaan van Stijn 44cc95141e add support for filtering by network ID
This adds support for filtering by network ID, to be
consistent with other filter options.

Note that only *full* matches are returned; this is
consistent with other filters (e.g. volume), that
also return full matches only.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:42 +00:00
Sainath Grandhi eef6bd0b23 Adding network filter to docker ps command
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
2017-06-02 00:07:42 +00:00
Yong Tang 7a63e88e36 Fix a couple of typos in the docs of `docker attach`
This fix fixed a couple of typos in the docs of `docker attach`:
docs/reference/commandline/attach.md
man/docker-attach.1.md

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:42 +00:00
Shijiang Wei d04810fa14 docs: correct network create command
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2017-06-02 00:07:42 +00:00
Yong Tang e7ec7bbd33 Fix a couple of typos in docker attach docs.
This fix fixes a couple of typos in docker attach docs:
docs/reference/commandline/attach.md
man/docker-attach.1.md

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:41 +00:00
John Howard 0cb3440a21 Builder default shell
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-02 00:07:41 +00:00
Sebastiaan van Stijn 7e00f19c4f Healthcheck: set default retries to 3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:41 +00:00
Alexander Morozov 9c351e61c0 attach: replace interface with simple type
Also add docs to detach events

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2017-06-02 00:07:41 +00:00
Sven Dowideit de82bb1c55 docs validation fixes
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:07:41 +00:00
Yong Tang 794db50fdf Add `--limit` option to `docker search`
This fix tries to address the issue raised in #23055.
Currently `docker search` result caps at 25 and there is
no way to allow getting more results (if exist).

This fix adds the flag `--limit` so that it is possible
to return more results from the `docker search`.

Related documentation has been updated.

Additional tests have been added to cover the changes.

This fix fixes #23055.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:41 +00:00
Yong Tang 1a22098ae2 Add support for comment in .dockerignore
This fix tries to address the issue raised in #20083 where
comment is not supported in `.dockerignore`.

This fix updated the processing of `.dockerignore` so that any
lines starting with `#` are ignored, which is similiar to the
behavior of `.gitignore`.

Related documentation has been updated.

Additional tests have been added to cover the changes.

This fix fixes #20083.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:41 +00:00
allencloud 54df0949b0 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-06-02 00:07:41 +00:00
Lukasz Zajaczkowski 25a9609845 Add documentation for running multiple daemons
Signed-off-by: Lukasz Zajaczkowski <lukasz.zajaczkowski@ts.fujitsu.com>
2017-06-02 00:07:41 +00:00
Thomas Leonard 51ddea93a2 Add support for user-defined healthchecks
This PR adds support for user-defined health-check probes for Docker
containers. It adds a `HEALTHCHECK` instruction to the Dockerfile syntax plus
some corresponding "docker run" options. It can be used with a restart policy
to automatically restart a container if the check fails.

The `HEALTHCHECK` instruction has two forms:

* `HEALTHCHECK [OPTIONS] CMD command` (check container health by running a command inside the container)
* `HEALTHCHECK NONE` (disable any healthcheck inherited from the base image)

The `HEALTHCHECK` instruction tells Docker how to test a container to check that
it is still working. This can detect cases such as a web server that is stuck in
an infinite loop and unable to handle new connections, even though the server
process is still running.

When a container has a healthcheck specified, it has a _health status_ in
addition to its normal status. This status is initially `starting`. Whenever a
health check passes, it becomes `healthy` (whatever state it was previously in).
After a certain number of consecutive failures, it becomes `unhealthy`.

The options that can appear before `CMD` are:

* `--interval=DURATION` (default: `30s`)
* `--timeout=DURATION` (default: `30s`)
* `--retries=N` (default: `1`)

The health check will first run **interval** seconds after the container is
started, and then again **interval** seconds after each previous check completes.

If a single run of the check takes longer than **timeout** seconds then the check
is considered to have failed.

It takes **retries** consecutive failures of the health check for the container
to be considered `unhealthy`.

There can only be one `HEALTHCHECK` instruction in a Dockerfile. If you list
more than one then only the last `HEALTHCHECK` will take effect.

The command after the `CMD` keyword can be either a shell command (e.g. `HEALTHCHECK
CMD /bin/check-running`) or an _exec_ array (as with other Dockerfile commands;
see e.g. `ENTRYPOINT` for details).

The command's exit status indicates the health status of the container.
The possible values are:

- 0: success - the container is healthy and ready for use
- 1: unhealthy - the container is not working correctly
- 2: starting - the container is not ready for use yet, but is working correctly

If the probe returns 2 ("starting") when the container has already moved out of the
"starting" state then it is treated as "unhealthy" instead.

For example, to check every five minutes or so that a web-server is able to
serve the site's main page within three seconds:

    HEALTHCHECK --interval=5m --timeout=3s \
      CMD curl -f http://localhost/ || exit 1

To help debug failing probes, any output text (UTF-8 encoded) that the command writes
on stdout or stderr will be stored in the health status and can be queried with
`docker inspect`. Such output should be kept short (only the first 4096 bytes
are stored currently).

When the health status of a container changes, a `health_status` event is
generated with the new status. The health status is also displayed in the
`docker ps` output.

Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:41 +00:00
Michael Friis b66fb42ff1 Add powershell example and make linux build example consistent with other examples
Signed-off-by: Michael Friis <friism@gmail.com>
2017-06-02 00:07:40 +00:00
Yong Tang 8aa59a76fe Fix error in dockerd.md for incorrect cluster-store-opts example.
This fix fixes an error in documentation (dockerd.md). In the
example given by dockerd.md, the option `cluster-store-opts`
is assigned with an array but this option can only be assigned
as a map.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:40 +00:00
Sven Dowideit f9d80051da Fix up stale links
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:07:40 +00:00
Darren Shepherd 8f23647017 Remove DOCKER_HTTP_HOST_COMPAT env var
Signed-off-by: Darren Shepherd <darren@rancher.com>
2017-06-02 00:07:40 +00:00
John Howard 1bc54f3466 Support platform file paths through escape
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-02 00:07:40 +00:00
Vincent Demeester aac0a3ee13 Add before and since filter to images
Add support for two now filter on the `images` command : `before` and
`since`. They work the same as the one on the `ps` command but for
images.

        $ docker images --filter before=myimage
        # display all images older than myimage
        $ docker images --filter since=myimage
        # display all images younger than myimage

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-02 00:07:40 +00:00
Yong Tang d1aaf129f2 The option --add-host and --net=host should not be mutually exclusive.
This fix tries to address the issue raised in #21976 and allows
the options of `--add-host` and `--net=host` to work at the same time.

The documentation has been updated and additional tests have been
added to cover this change.

This fix fixes #21976.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:40 +00:00
Yong Tang f17fb53f53 The option --dns, --dns-search, --dns-opt and --net=host should not be mutually exclusive.
This fix tries to address the issue raised in #21976 and allows
the options of `--dns`, `--dns-search`, `--dns-opt` and `--net=host`
to work at the same time.

The documentation has been updated and additional tests have been
added to cover this change.

This fix fixes #21976.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:40 +00:00
root 909fa15eb2 Fix some mistakes in dockerd.md
Signed-off-by: Wang Xing <hzwangxing@corp.netease.com>
2017-06-02 00:07:40 +00:00
Nahum Shalman b47dd5295d Clarification about 'docker build --build-arg'
See #22860

Signed-off-by: Nahum Shalman <nshalman@omniti.com>
2017-06-02 00:07:40 +00:00
Akihiro Suda c27c6d1a4e update docs/reference/commandline/cp.md
Close #22020

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-02 00:07:40 +00:00
Yong Tang d4d6b9689d Add filter for events emitted by docker daemon
This fix tries to cover the issue raised in #22463 by adding
filter for events emitted by docker daemon so that user could
utilize filter to receive events of interest.

Documentations have been updated for this fix.

Additional tests have been added to cover the changes in this fix.

This fix fixes #22463.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:39 +00:00
Yong Tang 91466baa3f Emit events for docker daemon
This fix tries to cover the issue raised in #22463 by emitting
events for docker daemon so that user could be notified by
scenarios like config reload, etc.

This fix adds the `daemon reload`, and events for docker daemon.

Additional tests have been added to cover the changes in this fix.

This fix fixes #22463.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:39 +00:00
Michael Friis 3cc96bb891 remove duplicated text
Signed-off-by: Michael Friis <friism@gmail.com>
2017-06-02 00:07:39 +00:00
Subhajit Ghosh 2f4d9eb6b1 Document valid chars in image name and tag
- Add link to valid image name and tag formats in referenced files
- Per review comments, updated docs to remove reference to `USERNAME` and
`REGISTRYHOST`.
- Per review comment, removed links from man page.
- Per review comment, added and updated examples on `docker tag`

Signed-off-by: Subhajit Ghosh <isubuz.g@gmail.com>
2017-06-02 00:07:39 +00:00
John Howard 6d54461bd8 Windows: Default to Hyper-V Containers on client
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-02 00:07:39 +00:00
John Howard 560134b63a Docs: JSON vs Shell clarification
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-02 00:07:39 +00:00
Fabrizio Soppelsa 52d265fff9 Add a --filter option to `docker search`
The filtering is made server-side, and the following filters are
supported:

* is-official (boolean)
* is-automated (boolean)
* has-stars (integer)

Signed-off-by: Fabrizio Soppelsa <fsoppelsa@mirantis.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-06-02 00:07:39 +00:00
Sebastiaan van Stijn 563b5dab54 Remove MLS example from SELinux example in run reference
Automatic translation of MLS labels is currently not
supported, so should not be documented as an example.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:39 +00:00
Justin Cormack ba8f5cfbb8 Align default seccomp profile with selected capabilities
Currently the default seccomp profile is fixed. This changes it
so that it varies depending on the Linux capabilities selected with
the --cap-add and --cap-drop options. Without this, if a user adds
privileges, eg to allow ptrace with --cap-add sys_ptrace then still
cannot actually use ptrace as it is still blocked by seccomp, so
they will probably disable seccomp or use --privileged. With this
change the syscalls that are needed for the capability are also
allowed by the seccomp profile based on the selected capabilities.

While this patch makes it easier to do things with for example
cap_sys_admin enabled, as it will now allow creating new namespaces
and use of mount, it still allows less than --cap-add cap_sys_admin
--security-opt seccomp:unconfined would have previously. It is not
recommended that users run containers with cap_sys_admin as this does
give full access to the host machine.

It also cleans up some architecture specific system calls to be
only selected when needed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-02 00:07:39 +00:00
Antonio Murdaca 09be3c1129 Ignore invalid host header between go1.6 and old docker clients
BenchmarkWithHack-4	   50000	     37082 ns/op	  44.50
MB/s	    1920 B/op	      30 allocs/op
BenchmarkNoHack-4  	   50000	     30829 ns/op	  53.52
MB/s	       0 B/op	       0 allocs/op

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-06-02 00:07:39 +00:00
Mrunal Patel 637048e176 Add support for --pid=container:<id>
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-06-02 00:07:39 +00:00
Lin Lu ff7d6e1eb8 doc:proxy-setting info added in pull cmd.
Replace Note with a new secion, reduce characters in
per line in 80. Add statement suggested by
https://github.com/thaJeztah

Signed-off-by: Lin Lu <doraalin@163.com>
2017-06-02 00:07:39 +00:00
mansinahar cd04941f04 Update 'run' command doc for better readability
Signed-off-by: Mansi Nahar <mansi.nahar@macbookpro-mansinahar.local>
2017-06-02 00:07:39 +00:00
Ivan Grcic 062cca7b19 remove double "using" in reference attach docs
Signed-off-by: Ivan Grcic <igrcic@gmail.com>
2017-06-02 00:07:38 +00:00
Charles Law cf70da5d08 Fix error for env variables example in docker reference
Signed-off-by: Charles Law <claw@conduce.com>
2017-06-02 00:07:38 +00:00
Yong Tang 9bc4cd536e Docker pull/push with max concurrency limits.
This fix tries to address issues raised in #20936 and #22443
where `docker pull` or `docker push` fails because of the
concurrent connection failing.
Currently, the number of maximum concurrent connections is
controlled by `maxDownloadConcurrency` and `maxUploadConcurrency`
which are hardcoded to 3 and 5 respectively. Therefore, in
situations where network connections don't support multiple
downloads/uploads, failures may encounter for `docker push`
or `docker pull`.

This fix tries changes `maxDownloadConcurrency` and
`maxUploadConcurrency` to adjustable by passing
`--max-concurrent-uploads` and `--max-concurrent-downloads` to
`docker daemon` command.

The documentation related to docker daemon has been updated.

Additional test case have been added to cover the changes in this fix.

This fix fixes #20936. This fix fixes #22443.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:38 +00:00
kevinmeredith a8e16c0079 Correct docs for a docker container's clean-up.
The 'Unix Signals' (https://en.wikipedia.org/wiki/Unix_signal#Handling_signals) wiki explains that:
> 'There are two signals which cannot be intercepted and handled: SIGKILL and SIGSTOP.'

Signed-off-by: kevinmeredith <kevin.m.meredith@gmail.com>
2017-06-02 00:07:38 +00:00
Tonis Tiigi 47ae76fd08 docs: clarify docker attach
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-02 00:07:38 +00:00
Brian Goff ce224853a2 Add support for reading logs extra attrs
The jsonlog logger currently allows specifying envs and labels that
should be propagated to the log message, however there has been no way
to read that back.

This adds a new API option to enable inserting these attrs back to the
log reader.

With timestamps, this looks like so:
```
92016-04-08T15:28:09.835913720Z foo=bar,hello=world hello
```

The extra attrs are comma separated before the log message but after
timestamps.

Without timestaps it looks like so:
```
foo=bar,hello=world hello
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-02 00:07:37 +00:00
Yuan Sun d16947629c from inheritted to inherited
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2017-06-02 00:07:37 +00:00
Zhu Guihua f440f14613 Add disk quota support for btrfs
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
2017-06-02 00:07:37 +00:00
Doug Davis fe09131526 Remove unnecessary double-double quotes
Signed-off-by: Doug Davis <dug@us.ibm.com>
2017-06-02 00:07:37 +00:00
Lucas Chan 0b4a6c36b7 Updated docker-info output and documentation
- [x] Update man page description
- [x] Update man page sample output to something more current

Tested with: `TESTFLAGS='-check.f DockerSuite.TestInfoEnsureSucceeds*'
make test-integration-cli`

Signed-off-by: Lucas Chan <lucas-github@lucaschan.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:37 +00:00
Wen Cheng Ma bdfe7963f2 Update the `docker daemon` to `dockerd` for document
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2017-06-02 00:07:37 +00:00
Yuan Sun 7d3bb7a6d0 remove "the" in docs.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2017-06-02 00:07:37 +00:00
Sebastiaan van Stijn efff6c2b24 Add "driver" filter for network ls
This add a new filter to 'docker network ls'
to allow filtering by driver-name.

Contrary to "ID" and "name" filters, this
filter only supports an *exact* match.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:37 +00:00
Hao Zhang 64ba15e3a3 update cgroup link in doc of run
Signed-off-by: Hao Zhang <21521210@zju.edu.cn>
2017-06-02 00:07:37 +00:00
Kai Qiang Wu(Kennan) c6d6752550 Add load/save image event support
For every docker load and save operations, it would log related
image events.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2017-06-02 00:07:36 +00:00
Darren Stahl bd299d2555 Add IO Resource Controls for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-06-02 00:07:36 +00:00
Sebastiaan van Stijn d192f97acc docs: add note about MAC addresses not being unique
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:36 +00:00
Dimitry Andric 4b30db603b The daemon.json storage-opts settings is actually a list.
Signed-off-by: Dimitry Andric <d.andric@activevideo.com>
2017-06-02 00:07:36 +00:00
Kai Qiang Wu(Kennan) 6a5870dcfa Fix the old exit status example
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2017-06-02 00:07:36 +00:00
Kai Qiang Wu(Kennan) 0a8f5574b4 Add network label filter support
This patch did following:

1) Make filter check logic same as `docker ps ` filters

Right now docker container logic work as following:
when same filter used like below:
 -f name=jack -f name=tom
it would get all containers name is jack or tom(it is or logic)

when different filter used like below:

 -f name=jack -f id=7d1
it would get all containers name is jack and id contains 7d1(it is and logic)

It would make sense in many user cases, but it did lack of compliate filter cases,
like "I want to get containers name is jack or id=7d1", it could work around use
(get id=7d1 containers' name and get name=jack containers, and then construct the
final containers, they could be done in user side use shell or rest API)

2) Fix one network filter bug which could include duplicate result
when use -f name=  -f id=, it would get duplicate results

3) Make id filter same as container id filter, which means match any string.
not use prefix match.

It is for consistent match logic

Closes: #21417

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2017-06-02 00:07:36 +00:00
Brian Goff a84e11aaf8 Allow volume drivers to provide a `Status` field
The `Status` field is a `map[string]interface{}` which allows the driver to pass
back low-level details about the underlying volume.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-02 00:07:36 +00:00
Darren Stahl 31e123d314 Add CPU count and maximum resource controls for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-06-02 00:07:36 +00:00
Dan Walsh a60c612a04 Add support for setting sysctls
This patch will allow users to specify namespace specific "kernel parameters"
for running inside of a container.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2017-06-02 00:07:36 +00:00
Mary Anthony 8850c4ab6e Fixes #21701 devicemapper docs
Copy edit the content
Updates to existing material
Adding mbentley's comments
Updating with last minute comments
Update with Seb's comments

Signed-off-by: Mary Anthony <mary@docker.com>
2017-06-02 00:07:36 +00:00
Thomas Riccardi 6ded7e8279 Improve build cache miss doc for `ARG` and `RUN`
The documentation already says the cache miss happens only at `ARG`
variable usage, not declaration, but there is a very common implicit
usage: `RUN`, which this commit documents even more, improving on #21790.

Also, use `definition` instead of `declaration`: it's the same thing, and
`definition` is already used in this documentation, contrary to
`declaration`.

Also, distinguish between "instructions" and "variables defined by `ARG`
instructions".

Signed-off-by: Thomas Riccardi <riccardi@systran.fr>
2017-06-02 00:07:36 +00:00
Yong Tang e450a54119 Change HumanSize to BytesSize for memory output in `docker stats`.
This fix tries to fix the discrepancy between `docker stats` and
`docker run` where `docker run` uses RAMInBytes for all memory
related inputs but `docker stats` uses HumanSize for all memory
related outputs.

To be consistent, `docker stats` needs to use BytesSize for all
memory related outputs to conform to RAMInBytes in `docker run`.

This fix addresses this issue. As BytesSize is used, the test
cases needs to be adjusted to match `KiB/MiB/GiB` instead of
`KB/MB/GB`.

The documentation has also been updated.

This fix fixes #21765.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-02 00:07:35 +00:00
Hyzhou d4aad85092 Fix the docker image --no-trunk output format
docker 1.10 change the output format of image id.

Signed-off-by: hyzhou.zhy <hyzhou.zhy@alibaba-inc.com>
2017-06-02 00:07:35 +00:00
Kai Qiang Wu(Kennan) a8a29fe7f5 Fix deprecated format for security-opt
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2017-06-02 00:07:35 +00:00
Lei Jitang 42dfcc1d2a Correct the description of --group-add in run.md
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-06-02 00:07:35 +00:00
mikelinjie bc060f1f19 make the cache miss clear
Signed-off-by: mikelinjie <294893458@qq.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:35 +00:00
Tomasz Kopczynski 5f02c0a5ab Add insecure registries to docker info
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
2017-06-02 00:07:35 +00:00
allencloud b45ed4a79d 1.change validateNoSchema into validateNoScheme
2.change schema into scheme in docs and some annotations.

Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-06-02 00:07:35 +00:00
Sebastiaan van Stijn 0a13b2a1ce Un-deprecate auto-creation of host directories for mounts
Auto-creation of host-directories was marked deprecated in
Docker 1.9, but was decided to be too much of an backward-incompatible
change, so it was decided to keep the feature.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:35 +00:00
Anusha Ragunathan 31c32956ca When using systemd, pass expected cgroupsPath and cli options to runc.
runc expects a systemd cgroupsPath to be in slice:scopePrefix:containerName
format and the "--systemd-cgroup" option to be set. Update docker accordingly.

Fixes 21475

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2017-06-02 00:07:34 +00:00
Aaron Lehmann 5161f2dc15 Mention "docker login" in push/pull documentation
It was suggested to me that documentation for "docker pull" and "docker
push" should reference "docker login", to make clearer how to specify
credentials for a push or pull operation. Add a note to the manual pages
and reference documentation explaining how registry credentials are
managed.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-06-02 00:07:34 +00:00
Harald Albers 85f983178b docs for `docker daemon --containerd`
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:07:34 +00:00
Shishir Mahajan 791a5fc5c1 CLI flag for docker create(run) to change block device size.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2017-06-02 00:07:34 +00:00
Harald Albers 52ccec4cbc fix wrong option name in `dm.min_free_space` examples
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:07:34 +00:00
Harald Albers f3f9b34d2a docs for labels on build, networks and volumes
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:07:33 +00:00
Kai Qiang Wu(Kennan) d69044537c Add name/driver filter support for volume
This change include filter `name` and `driver`,
and also update related docs to reflect that filters usage.

Closes: #21243

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2017-06-02 00:07:33 +00:00
Harald Albers 386acc792b add docs for `docker load --quiet`
Signed-off-by: Harald Albers <github@albersweb.de>
2017-06-02 00:07:33 +00:00
Sven Dowideit 80f5ed58a5 WORKDIR is like calling mkdir - but we've not told people
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 00:07:33 +00:00
Kenfe-Mickael Laventure 4ffd1a9433 Remove unneeded references to execDriver
This includes:
 - updating the docs
 - removing dangling variables

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-06-02 00:07:33 +00:00
Phil Estes 0926303632 Allow net and IPC namespaces to be shared when userns=on
Now that the namespace sharing code via runc is vendored with the
containerd changes, we can disable the restrictions on container to
container net and IPC namespace sharing when the daemon has user
namespaces enabled.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2017-06-02 00:07:33 +00:00
Brian Goff eba678647b Add explicit flags for volume cp/no-cp
This allows a user to specify explicitly to enable
automatic copying of data from the container path to the volume path.
This does not change the default behavior of automatically copying, but
does allow a user to disable it at runtime.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-02 00:07:32 +00:00
Martin Mosegaard Amdisen c0271978f9 Update 'save' command help
Based on review feedback.

Signed-off-by: Martin Mosegaard Amdisen <martin.amdisen@praqma.com>
2017-06-02 00:07:32 +00:00
Martin Mosegaard Amdisen 315c34a25a Fix plural typo in 'save' command help
The form "Save an images" is not correct.
Either "Save an image" or "Save images" work, but since
the save commands accepts multiple images, I chose the
latter.

Fixed in all places where I could grep "Save an image(s)".

Signed-off-by: Martin Mosegaard Amdisen <martin.amdisen@praqma.com>
2017-06-02 00:07:32 +00:00
David Calavera a7364b3743 Consolidate security options to use `=` as separator.
All other options we have use `=` as separator, labels,
log configurations, graph configurations and so on.
We should be consistent and use `=` for the security
options too.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2017-06-02 00:07:32 +00:00
Dan Walsh 2d0316cb43 Fix documentation on --security-opt seccomp
Missing documentation and man pages on seccomp options.
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2017-06-02 00:07:32 +00:00
Zhang Wei d219111855 Fix typo
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2017-06-02 00:07:32 +00:00
Sebastiaan van Stijn 75bcb4f94a Update Docker pull examples
The old examples no longer worked due to changes in
the client and Docker Hub.

This updates the "docker pull" documentation and
adds more examples and explanation of the features.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-02 00:07:32 +00:00
Jason Heiss 6bcb137d2f Allow --hostname with --net=host
Docker creates a UTS namespace by default, even with --net=host, so it
is reasonable to let the user set the hostname. Note that --hostname is
forbidden if the user specifies --uts=host.

Closes #12076
Signed-off-by: Jason Heiss <jheiss@aput.net>
2017-06-02 00:07:32 +00:00
Kai Qiang Wu(Kennan) 2422bc30f5 Add the missed volume filter
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2017-06-02 00:07:32 +00:00