Commit Graph

409 Commits

Author SHA1 Message Date
912aa358d8 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>
Upstream-commit: 7a63e88e36
Component: cli
2017-06-02 00:07:42 +00:00
744bf7d726 docs: correct network create command
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: d04810fa14
Component: cli
2017-06-02 00:07:42 +00:00
843aab9e59 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>
Upstream-commit: e7ec7bbd33
Component: cli
2017-06-02 00:07:41 +00:00
c1b5141a07 Builder default shell
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0cb3440a21
Component: cli
2017-06-02 00:07:41 +00:00
7291a7792b Healthcheck: set default retries to 3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7e00f19c4f
Component: cli
2017-06-02 00:07:41 +00:00
30ff620184 attach: replace interface with simple type
Also add docs to detach events

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 9c351e61c0
Component: cli
2017-06-02 00:07:41 +00:00
3e4d4aaf26 docs validation fixes
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: de82bb1c55
Component: cli
2017-06-02 00:07:41 +00:00
385cc45453 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>
Upstream-commit: 794db50fdf
Component: cli
2017-06-02 00:07:41 +00:00
8d1fcd5543 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>
Upstream-commit: 1a22098ae2
Component: cli
2017-06-02 00:07:41 +00:00
e0d28370c7 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 54df0949b0
Component: cli
2017-06-02 00:07:41 +00:00
6e5c5dade0 Add documentation for running multiple daemons
Signed-off-by: Lukasz Zajaczkowski <lukasz.zajaczkowski@ts.fujitsu.com>
Upstream-commit: 25a9609845
Component: cli
2017-06-02 00:07:41 +00:00
4231660e73 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>
Upstream-commit: 51ddea93a2
Component: cli
2017-06-02 00:07:41 +00:00
c82a97d01f Add powershell example and make linux build example consistent with other examples
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: b66fb42ff1
Component: cli
2017-06-02 00:07:40 +00:00
5ae8a7cfb6 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>
Upstream-commit: 8aa59a76fe
Component: cli
2017-06-02 00:07:40 +00:00
db4fbae2ac Fix up stale links
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: f9d80051da
Component: cli
2017-06-02 00:07:40 +00:00
01a71c2f06 Remove DOCKER_HTTP_HOST_COMPAT env var
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: 8f23647017
Component: cli
2017-06-02 00:07:40 +00:00
1b53e94231 Support platform file paths through escape
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1bc54f3466
Component: cli
2017-06-02 00:07:40 +00:00
01613a96f6 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>
Upstream-commit: aac0a3ee13
Component: cli
2017-06-02 00:07:40 +00:00
711901f473 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>
Upstream-commit: d1aaf129f2
Component: cli
2017-06-02 00:07:40 +00:00
41d05e62cc 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>
Upstream-commit: f17fb53f53
Component: cli
2017-06-02 00:07:40 +00:00
129f3f5c31 Fix some mistakes in dockerd.md
Signed-off-by: Wang Xing <hzwangxing@corp.netease.com>
Upstream-commit: 909fa15eb2
Component: cli
2017-06-02 00:07:40 +00:00
9eeb438b78 Clarification about 'docker build --build-arg'
See #22860

Signed-off-by: Nahum Shalman <nshalman@omniti.com>
Upstream-commit: b47dd5295d
Component: cli
2017-06-02 00:07:40 +00:00
1fc3ef1662 update docs/reference/commandline/cp.md
Close #22020

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: c27c6d1a4e
Component: cli
2017-06-02 00:07:40 +00:00
df98c4a7c2 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>
Upstream-commit: d4d6b9689d
Component: cli
2017-06-02 00:07:39 +00:00
93a4d96e98 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>
Upstream-commit: 91466baa3f
Component: cli
2017-06-02 00:07:39 +00:00
1571188650 remove duplicated text
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: 3cc96bb891
Component: cli
2017-06-02 00:07:39 +00:00
4f04cf5303 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>
Upstream-commit: 2f4d9eb6b1
Component: cli
2017-06-02 00:07:39 +00:00
148e87db2f Windows: Default to Hyper-V Containers on client
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6d54461bd8
Component: cli
2017-06-02 00:07:39 +00:00
d9def6c55e Docs: JSON vs Shell clarification
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 560134b63a
Component: cli
2017-06-02 00:07:39 +00:00
5f272b899b 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>
Upstream-commit: 52d265fff9
Component: cli
2017-06-02 00:07:39 +00:00
db8fde32b9 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>
Upstream-commit: 563b5dab54
Component: cli
2017-06-02 00:07:39 +00:00
8cac76883e 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>
Upstream-commit: ba8f5cfbb8
Component: cli
2017-06-02 00:07:39 +00:00
f5463e5779 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>
Upstream-commit: 09be3c1129
Component: cli
2017-06-02 00:07:39 +00:00
53b32800ef Add support for --pid=container:<id>
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 637048e176
Component: cli
2017-06-02 00:07:39 +00:00
054edd1ac8 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>
Upstream-commit: ff7d6e1eb8
Component: cli
2017-06-02 00:07:39 +00:00
57ab66add6 Update 'run' command doc for better readability
Signed-off-by: Mansi Nahar <mansi.nahar@macbookpro-mansinahar.local>
Upstream-commit: cd04941f04
Component: cli
2017-06-02 00:07:39 +00:00
86dd626e01 remove double "using" in reference attach docs
Signed-off-by: Ivan Grcic <igrcic@gmail.com>
Upstream-commit: 062cca7b19
Component: cli
2017-06-02 00:07:38 +00:00
d1c631b863 Fix error for env variables example in docker reference
Signed-off-by: Charles Law <claw@conduce.com>
Upstream-commit: cf70da5d08
Component: cli
2017-06-02 00:07:38 +00:00
c80f87b0c8 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>
Upstream-commit: 9bc4cd536e
Component: cli
2017-06-02 00:07:38 +00:00
e811a0b92a 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>
Upstream-commit: a8e16c0079
Component: cli
2017-06-02 00:07:38 +00:00
b7df376665 docs: clarify docker attach
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 47ae76fd08
Component: cli
2017-06-02 00:07:38 +00:00
bfdafc4b57 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>
Upstream-commit: ce224853a2
Component: cli
2017-06-02 00:07:37 +00:00
6777871c09 from inheritted to inherited
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: d16947629c
Component: cli
2017-06-02 00:07:37 +00:00
abbc88dfa4 Add disk quota support for btrfs
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Upstream-commit: f440f14613
Component: cli
2017-06-02 00:07:37 +00:00
96321e2038 Remove unnecessary double-double quotes
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: fe09131526
Component: cli
2017-06-02 00:07:37 +00:00
de3801535e 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>
Upstream-commit: 0b4a6c36b7
Component: cli
2017-06-02 00:07:37 +00:00
07abec734c Update the docker daemon to dockerd for document
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: bdfe7963f2
Component: cli
2017-06-02 00:07:37 +00:00
ef2cb7e662 remove "the" in docs.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: 7d3bb7a6d0
Component: cli
2017-06-02 00:07:37 +00:00
707ffcbec6 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>
Upstream-commit: efff6c2b24
Component: cli
2017-06-02 00:07:37 +00:00
a1deb91f73 update cgroup link in doc of run
Signed-off-by: Hao Zhang <21521210@zju.edu.cn>
Upstream-commit: 64ba15e3a3
Component: cli
2017-06-02 00:07:37 +00:00