Commit Graph

136 Commits

Author SHA1 Message Date
41f493236b Merge pull request #27819 from lixiaobing10051267/masterDirInvalid
fill all the rest invalid address because no related directory
Upstream-commit: 010ee5a8e84b3bb5f5a79690e77fd9b135643641
Component: engine
2016-10-28 13:05:18 -07:00
17e336a83a fill all the rest invalid address because no related directory
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 7d1eb5ea1bcf68391576f92a0660ac785a498fd4
Component: engine
2016-10-28 11:12:54 +08:00
810cfad17d fill the complete address because of no userguide directory
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 97c00f9754271bbc03c6309793482e11920e4f3e
Component: engine
2016-10-28 10:57:37 +08:00
3affb6aba8 Implementing support for --cpu-rt-period and --cpu-rt-runtime so that
containers may specify these cgroup values at runtime. This will allow
processes to change their priority to real-time within the container
when CONFIG_RT_GROUP_SCHED is enabled in the kernel. See #22380.

Also added sanity checks for the new --cpu-rt-runtime and --cpu-rt-period
flags to ensure that that the kernel supports these features and that
runtime is not greater than period.

Daemon will support a --cpu-rt-runtime flag to initialize the parent
cgroup on startup, this prevents the administrator from alotting runtime
to docker after each restart.

There are additional checks that could be added but maybe too far? Check
parent cgroups to ensure values are <= parent, inspecting rtprio ulimit
and issuing a warning.

Signed-off-by: Erik St. Martin <alakriti@gmail.com>
Upstream-commit: 56f77d5ade945b3b8816a6c8acb328b7c6dce9a7
Component: engine
2016-10-26 11:33:06 -04:00
633c4cbeb6 Typo --ti and missing my_strace_docker_image
Signed-off-by: Leo Gallucci <leo.gallucci@zalando.de>
Upstream-commit: a5b69faafba8bbb85094993edf48bab106e7b54d
Component: engine
2016-10-26 06:07:42 +02:00
b2f3f16f09 Sync docker/docker refs with files mistakenly edited in docker.github.io repo
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 3b36f02c03ec050aa46f9a01cd2d6c60ffd93652
Component: engine
2016-10-20 10:51:30 -07:00
9fe833df60 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>
Upstream-commit: b30609446d212624e3d4ce814c70130b75c552a0
Component: engine
2016-10-14 15:44:55 -07:00
ec7885ffb8 Add support for ambient capabilities
Linux kernel 4.3 and later supports "ambient capabilities" which are the
only way to pass capabilities to containers running as a non root uid.

Previously there was no way to allow containers not running as root
capabilities in a useful way.

Fix #8460

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 199e19548e93262ab00873c1d761b0d05f866042
Component: engine
2016-10-10 19:29:02 +01:00
3e89d9cc8d Remove extra paren in run --link docs
Signed-off-by: Josh Bodah <jb3689@yahoo.com>
Upstream-commit: 484fbe236dcab9fb5b8d48844a8cdc9d614e32e9
Component: engine
2016-09-16 15:32:12 -04:00
1647b02210 Merge pull request #25828 from yuexiao-wang/clean-docs
clean up the run.md in reference
Upstream-commit: 2cec66d0f548a274d723dbdfb27d3fafb6df7ec2
Component: engine
2016-08-27 14:50:47 +02:00
de5170b89d Fixes #25918 - Changed --permissive to --privileged.
Signed-off-by: Rich Moyse <rich@moyse.us>
Upstream-commit: b63ce3305c1dd3aec307bbe3bfe0aead295137cb
Component: engine
2016-08-25 16:49:37 -04:00
a8b63c7173 clean up the run.md in reference
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: dd02815a2673794cd94f3225c5517d9f30d09d56
Component: engine
2016-08-18 10:21:41 +08:00
3a9b1e9ecd Split list of capabilities into those added by default and those not
The documentation was a bit unhelpful as to what are the default
capabilities, so split.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: bf7a3f010443ecd614baf0450c3193b1f5e52bc2
Component: engine
2016-08-17 21:16:54 +01:00
0c71c314fa Update documentation for entrypoint unset with docker run/create
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 26c913cb6054236e2df5b4a1fcdc5708c4be8f4c
Component: engine
2016-08-05 16:35:25 -07:00
77f65011eb Add note about --entrypoint overriding default command
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Upstream-commit: 2b7548f97298565bd57a9c26e4eba3aa6e23f8a5
Component: engine
2016-07-25 17:21:23 +01:00
31552e5edc Document --oom-score-adj flag in docker run
This was only mentioned in docker create documentation.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 6ba6265d1ad86680ad7f7750ae1f9abb72f1e728
Component: engine
2016-07-15 14:11:54 +01:00
87b7341bb5 Expand the documentation of "no-new-privileges"
The change to runc in https://github.com/opencontainers/runc/pull/789
was not documented previously. Also say what this affects and clean
up layout of initial table as there was some miscolouration of the
continuation lines.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 3050d9af9b2384baed599be9d7142b4775f89e10
Component: engine
2016-07-13 14:41:58 +01:00
a4c4731dc9 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>
Upstream-commit: c0c7d5e71586ec8e4d54aef9e061f061e9223cc4
Component: engine
2016-07-12 13:01:35 -07:00
6c19b5ff61 Allow user to specify container's link-local addresses
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 1c4efb6aa05026efce99a7a5bb7e710c0f1b3002
Component: engine
2016-06-14 14:28:33 -07:00
b2d3f0c2e7 Merge pull request #23492 from londoncalling/docs-surface-tutorials-v1.12
surfacing Learn by example topics to top level of Docker Engine docs
Upstream-commit: 2a96ac66ea41d206161a6ef022e10d53f99e86ec
Component: engine
2016-06-14 21:10:17 +10:00
ce19593c15 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>
Upstream-commit: 8eca8089fa35f652060e86906166dabc42e556f8
Component: engine
2016-06-13 13:32:30 -07:00
a8d0a6bea4 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>
Upstream-commit: e6e8c4d700c4510e463eb16fedba51b6e8a3ccd6
Component: engine
2016-06-13 18:00:41 +00:00
4524589dc5 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: b6c7becbfe1d76b1250f6d8e991e645e13808a9c
Component: engine
2016-06-02 23:58:34 +02:00
b520646fdd 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: 90bd41a74d57080711678bffa2bc4371020ee3a5
Component: engine
2016-05-24 18:49:11 -07:00
e230ff1485 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: 23821fe5867427fa36c265bc994b1a2c3cf9b21f
Component: engine
2016-05-24 16:03:26 -07:00
b1cf67eeb6 remove duplicated text
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: 5271a69411e93a2b694c84f7f8216f0d91404e07
Component: engine
2016-05-23 19:01:30 -07:00
de6e0e2745 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: 841cf6fffb6a821d6c5777871090c9d2bcc95b36
Component: engine
2016-05-20 14:58:58 +02:00
f66ae64dbf Merge pull request #22554 from justincormack/seccap
Align default seccomp profile with selected capabilities
Upstream-commit: 0e9009bae3a493cfce8a8334949b239efcb88f43
Component: engine
2016-05-20 12:58:28 +02:00
612ad97231 Add support for --pid=container:<id>
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: fb43ef649bc6aa11ca19c0e046518e85e1c7e2fa
Component: engine
2016-05-17 13:49:05 -04:00
c571f88b8d 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: a01c4dc8f85827f32d88522e5153dddc02f11806
Component: engine
2016-05-11 09:30:23 +01:00
1237d12945 from inheritted to inherited
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: fe1130b7bab0d0724133b4d0e2aa0ca5a5dc0222
Component: engine
2016-05-07 17:15:02 +08:00
cd7f106f6e Merge pull request #22499 from duglin/removeQuotes
Remove unnecessary double-double quotes
Upstream-commit: e7584a7fdf2170a5a75a2376ed914176665efab9
Component: engine
2016-05-04 15:35:45 +02:00
bf2c596602 Remove unnecessary double-double quotes
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 8eb2188bd93c01533e201a37e1e674f5b53cb597
Component: engine
2016-05-04 05:15:57 -07:00
ef3d0f56d0 remove "the" in docs.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: 043c9ef076477a391a58792930100402b48bbe1e
Component: engine
2016-05-01 15:37:11 +08:00
661a968ea5 update cgroup link in doc of run
Signed-off-by: Hao Zhang <21521210@zju.edu.cn>
Upstream-commit: 8fec7c26d4e831481674bcab7a0539affc91da29
Component: engine
2016-04-27 08:50:46 -04:00
3e3ec58c45 Merge pull request #22196 from thaJeztah/add-mac-address-note
docs: add note about MAC addresses not being unique
Upstream-commit: 9b00817dc692458f9e27e375a870ecd0dcbd0b75
Component: engine
2016-04-22 11:26:17 +10:00
a659558dcf Fix the old exit status example
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 896ebb1ca2a6ae23d7511678aaab1d4e32c54ff9
Component: engine
2016-04-21 03:24:10 +00:00
a63f858c5e docs: add note about MAC addresses not being unique
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 763aceeb733cdd927eb2de6232f0257267b6f71e
Component: engine
2016-04-20 19:24:39 +02:00
d23c572e2b Fix deprecated format for security-opt
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 0b207e75585cd4ba9a40460d87766052dd7508a7
Component: engine
2016-04-07 02:09:18 +00:00
d8939e35f7 Correct the description of --group-add in run.md
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 9a7f2e726885386f57d115f8652b0ae87b20dce6
Component: engine
2016-04-06 21:52:10 +08:00
d01eb0569f 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>
Upstream-commit: 0f70f53826ac311ca1653827c0d6bc170f300e84
Component: engine
2016-03-30 15:00:09 -07:00
308c81e7d4 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>
Upstream-commit: b0ac69b67ef79c6c937f84bee3df20a1924ad334
Component: engine
2016-03-21 20:38:44 -04:00
cb854bf11c 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>
Upstream-commit: cb9aeb0413ca75bb3af7fa723a1f2e6b2bdbcb0e
Component: engine
2016-03-17 13:34:42 -04:00
0a38211674 Merge pull request #21286 from rhatdan/seccomp-man
Fix documentation on --security-opt seccomp
Upstream-commit: b4da1578463f65b4703021b72ad17753fb29cdb4
Component: engine
2016-03-17 10:29:33 -07:00
52e22ba517 Fix documentation on --security-opt seccomp
Missing documentation and man pages on seccomp options.
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: 450fa7536edc03fb5b071c0d04af534b2f8572ff
Component: engine
2016-03-17 08:04:02 -04:00
2250308978 Fix typo
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: ca64269165fb30765d7ea0b0b231674df8da157b
Component: engine
2016-03-17 16:13:51 +08:00
76a4963d49 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>
Upstream-commit: 3f445e63b4568845f439c5d30a99ba10603b1938
Component: engine
2016-03-09 20:40:12 -05:00
3e9b68d581 Add support for NoNewPrivileges in docker
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>

Add tests for no-new-privileges

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>

Update documentation for no-new-privileges

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 74bb1ce9e9dbfa9dd866e84f891e865fca906d9a
Component: engine
2016-03-07 09:47:02 -08:00
ea8becc33f update cap-add docs for seccomp
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 1e92e5fdaab833000d6d3a4f6756cb677cb7899e
Component: engine
2016-02-11 13:47:08 -08:00
2d3744313f Merge pull request #20234 from kiawin/20232-improve-overriding-user-command-details
Improve usage details on overriding USER command in Docker run refere…
Upstream-commit: d4d0b8a42bcf5e5e1df3565101277dc10843735a
Component: engine
2016-02-11 18:18:26 +01:00