Commit Graph

23008 Commits

Author SHA1 Message Date
b7559c81f8 Bump engine-api to fa04f66c7871183dd53a5ec666479f49b452743d
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 76d8b0dab76610526b28a657ac13db6f8c89c0e1
Component: engine
2016-06-03 00:14:55 +02: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
805e334e2c Merge pull request #23212 from LK4D4/remove_unused_var
pkg/parser/kernel: remove unused var block
Upstream-commit: d1b1b6a98ef5381d2f3702d2c11856f692a0a412
Component: engine
2016-06-02 16:30:05 -04:00
44649a5cdf Merge pull request #23140 from Microsoft/HcsshimRevendor
Revendor hcsshim
Upstream-commit: eb9274844efd5e08226a98de79f0f5237a6e2458
Component: engine
2016-06-02 22:09:19 +02:00
bc51dad73c Merge pull request #23206 from mlaventure/fix-release-deb
Fix release-deb script
Upstream-commit: 4399d3b309a5af06471382ecf22c40f24d218c73
Component: engine
2016-06-02 21:22:49 +02:00
293f9965b9 Merge pull request #22806 from errordeveloper/master
Remove MountFlags in systemd unit to allow shared mount propagation
Upstream-commit: 791f98290e0e88c76cb916d6e1d211467f36e230
Component: engine
2016-06-02 20:04:08 +02:00
f525106e1c pkg/parser/kernel: remove unused var block
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6e5894b5511846b1be64f6fcae73a8b4ddd0ef24
Component: engine
2016-06-02 10:50:36 -07:00
53602a37d4 Merge pull request #22549 from allencloud/make-pkg-parsers-support-darwin
add darwin support in package docker/pkg/parsers
Upstream-commit: 34f54b3a11291b70b4316c2b4e047d8aafa95bed
Component: engine
2016-06-02 10:48:19 -07:00
1d1d68b640 Merge pull request #23208 from vdemeester/update-engine-api
Bump engine api to 009ba16
Upstream-commit: cb8e7470be022e55653e5472c72ee73ec5fc1bc6
Component: engine
2016-06-02 09:30:57 -07:00
c30ea46ede Fix release-deb script
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: afc2579d1a5aa3b95d90d6a1fdf7d6a4e3058fd6
Component: engine
2016-06-02 08:53:33 -07:00
eaf6e81896 Merge pull request #23153 from AkihiroSuda/fix23152PkgGitutils
Fix gitconfig dependency in pkg/gitutils.TestCheckoutGit
Upstream-commit: f69353a364e0ec6ddb0cff3991ee0b44d87285c1
Component: engine
2016-06-02 17:21:38 +02:00
b9498f5bad Merge pull request #23179 from kerneltime/master
Add VMware Docker Volume Plugin.
Upstream-commit: 09033b8df223c3d3ea1fc97bc86cd6f23e1cdfc3
Component: engine
2016-06-02 17:05:32 +02:00
f9f967f68a Update ContainerStart calls to use options now
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6b7f12650d8333bf088271acecea5256aef99c41
Component: engine
2016-06-02 16:56:13 +02:00
27ed0fbcf5 Update engine-api to 009ba1641d669613b38818f6f6385b0e74c5728f
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8ea051f01261c44512bcaa76569a7fb9a200bab6
Component: engine
2016-06-02 16:55:49 +02:00
eceb2f3e2e Merge pull request #23183 from caarlos0/permissions
Removed exec permissions from Dockerfile.windows
Upstream-commit: 80b3e9e8103f0898296de6140149050877eecea3
Component: engine
2016-06-02 16:10:37 +02:00
bd8dbcc1e8 Merge pull request #22460 from jwhonce/wip/sigpipe
Ignore SIGPIPE events
Upstream-commit: 171af5493121bada5c0e8167ade44da52648d0e2
Component: engine
2016-06-02 16:05:22 +02:00
3bf6a7fe89 Merge pull request #23161 from AkihiroSuda/rename-misleading-function-name
daemon: Rename copy to copyFunc
Upstream-commit: 0aeac288a33e498ad6bfa5a91f044a469c78a138
Component: engine
2016-06-02 15:31:08 +02:00
ce5b5efc4f Merge pull request #23121 from unclejack/disallow_ecryptfs_aufs
aufs,overlay: disable on eCryptfs
Upstream-commit: 22aca92ee3503f811f813be4a1349ad8e67fbbdb
Component: engine
2016-06-02 12:54:43 +02:00
3791819a91 Merge pull request #23190 from AkihiroSuda/addendum23141
Fix the comment for daemon/logger.Copier
Upstream-commit: 69545fe19d294d5ff4c43c2adc2795935f14ae61
Component: engine
2016-06-02 12:21:52 +02:00
c39a2ca771 Fix gitconfig dependency in pkg/gitutils.TestCheckoutGit
Fix #23152

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: efc250bc6b1c252a5884011402b9e4dc4a1632d7
Component: engine
2016-06-02 17:44:09 +09:00
89431d14b9 cleanup: clean up commented code in daemon/stats.go
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 2d9c02294683e78f9165585a134b090ed47d9bff
Component: engine
2016-06-02 14:39:12 +08:00
894477b221 daemon: Rename copy to copyFunc
"copy" can be misleading for humans because Go has its own builtin "copy" function

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 8bce6265fca22c117cf6d69d9ffd4ee78da9db8a
Component: engine
2016-06-02 13:30:20 +09:00
0593e6d766 Fix the comment for daemon/logger.Copier
Now daemon/logger.Copier does not use ContainerID

Addendum to #23141

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 518709a87e04f55babc5162861aa4ba9a423f0c8
Component: engine
2016-06-02 13:10:51 +09:00
e42445eaa3 make pkg/parsers support darwin and solaris
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: a7f551359ad187a37663b39afdfe33122addea30
Component: engine
2016-06-02 11:47:27 +08:00
c944984315 Merge pull request #23141 from nalind/logger-remove-cid
Remove the logger.Message ContainerID field
Upstream-commit: 287b0a6348d8f768db6ff840feedcb32a4c2d448
Component: engine
2016-06-01 23:13:38 -04:00
86a406432b Merge pull request #23151 from AkihiroSuda/fix23012PkgAuth
Fix racy tests in pkg/authorization
Upstream-commit: 7e5561a438bebd8bd2096231e3d2848b016a162b
Component: engine
2016-06-01 20:45:54 -04:00
f88c951e19 Merge pull request #22867 from justincormack/checklimits
Begin a section in the check-config script to check limits
Upstream-commit: 273ab8591e5aaca6767c1a5ce4b66ed53897a51e
Component: engine
2016-06-01 20:42:54 -04:00
dd98136a3d Removed exec permissions from Dockerfile.windows
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
Upstream-commit: db3351ae379bdaba0b863d52b9d9280836fd75c7
Component: engine
2016-06-01 21:41:19 -03:00
4627ca71f9 Add VMware Docker Volume Plugin.
Add reference to https://github.com/vmware/docker-volume-vsphere to Docker's list of plugins.
This is an officially supported plugin from VMware.

Signed-off-by: Ritesh H Shukla <sritesh@vmware.com>
Upstream-commit: f5df49b3dcfeb1164ca60d4dbf7756603e61a299
Component: engine
2016-06-01 15:29:15 -07:00
31e766e68c Merge pull request #23120 from AkihiroSuda/fixStreamFormatter
Fix pkg/streamformatter.TestJSONFormatProgress
Upstream-commit: 2ca25302fe7033ab0129554bb679294aa04db70b
Component: engine
2016-06-01 14:37:35 -07:00
e0398fafd2 Merge pull request #22769 from dnephin/integrate_cobra
Use spf13/cobra for the cli
Upstream-commit: 28676fc04b9a307718b66bd28e8d9281d05f38ac
Component: engine
2016-06-01 14:18:23 -07:00
0f5d306d0d Merge pull request #23090 from yongtang/05292016-remove-deprecated-docker-tag-f
Remove deprecated -f flag on docker tag
Upstream-commit: cbccb19212c186e5baf5e09b130a7fcc1d58df4c
Component: engine
2016-06-01 21:29:33 +02:00
e85968bd52 aufs,overlay: disable on eCryptfs
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 5e85ec82af6c8ec70ed39fd8489aea730fd41561
Component: engine
2016-06-01 21:00:35 +03:00
3cbc347e63 Merge pull request #23148 from mlaventure/wait-for-containerd-before-restarting-it
Wait for containerd to die before restarting it
Upstream-commit: cb36dddad150a3bc0986736a877c8bdfcfbd346c
Component: engine
2016-06-01 10:35:31 -07:00
0739417adc Update remote API docs for the removal of deprecated force in docker tag.
This fix updates remote API docs for the removal of deprecated `force` in `docker tag`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7b08941882668c1c40adb03d9227d22e0aa5e605
Component: engine
2016-06-01 09:45:10 -07:00
5dcdbc4a5a Remove deprecated -f flag on docker tag
The -f flag on docker tag has been deprecated in docker 1.10 and
is expected to be removed in docker 1.12.

This fix removed the -f flag on docker tag and also updated
deprecated.md.

NOTE: A separate pull request for engine-api has been opened to
cover the related changes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4455ec14b87d5ad474c5e11d60907bceb35e9e09
Component: engine
2016-06-01 09:44:25 -07:00
2d116f099f Vendor engine-api to 6facb3f3c38717b8f618dcedc4c8ce20d1bfc61e
This fix updates engine-api to 6facb3f3c38717b8f618dcedc4c8ce20d1bfc61e.

This fix is related to #23090.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1dab9af5d5acc1fe3a1bfb84a5cc576d664095e4
Component: engine
2016-06-01 09:44:25 -07:00
499b99fb58 Merge pull request #22570 from mountkin/rm-deprecated-feature
remove deprecated feature of passing HostConfig at API container start
Upstream-commit: 4b86651053d92429ee2a73abd2d815a5d4c936a1
Component: engine
2016-06-01 18:24:28 +02:00
357ff8123d Merge pull request #23085 from icecrime/gitdm.config
Add gitdm configuration
Upstream-commit: 09be7d9ee4533c0b60c0c2b70d0cde41a86e5049
Component: engine
2016-06-01 18:12:59 +02:00
5934bb4c2f Merge pull request #23165 from thaJeztah/update-logging-code-hints
cleanup logging driver documentation
Upstream-commit: 8d75709f90ba9926d41cd7b91bb316e336af8f8c
Component: engine
2016-06-01 17:55:24 +02:00
e66ae89f7b Merge pull request #23142 from Microsoft/ExtraCleanup
Windows: Remove a double free on hcs container handle
Upstream-commit: bcf0c8ca2883867ba7dcec4824a64359ee7cab12
Component: engine
2016-06-01 11:09:06 -04:00
f05fdb403b Merge pull request #23084 from estesp/ps-fastpath
Optimize `docker ps` when name/id filters in use
Upstream-commit: 466eb1bab702f7afd652e57f6041124d5399fbd4
Component: engine
2016-06-01 16:52:35 +02:00
a612268e81 Wait for containerd to die before restarting it
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: ce160b37e15ddb86c45314d080718f833e551aa3
Component: engine
2016-06-01 07:45:03 -07:00
67d0b2dc23 remove deprecated feature of passing HostConfig at API container start
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 0a8386c8be3fa87b7523bef7fd31c81a7f84709c
Component: engine
2016-06-01 22:25:17 +08:00
9c661aedc4 Merge pull request #22989 from Microsoft/StartCleanup
Windows: Adding missing cleanup call when container start fails
Upstream-commit: c7aba69cc10faee84ba877ad4a94e4e150cb0932
Component: engine
2016-06-01 15:42:47 +02:00
ef3d1ff998 Merge pull request #23072 from dnephin/set_state_dir_of_containerd
Set --state-dir on containerd
Upstream-commit: 1ba9aadbcb8444e4dd70cd83f0d14d7f3c694f10
Component: engine
2016-06-01 14:56:32 +02:00
f27714bc80 Merge pull request #23133 from runcom/graphtests-fix
graphtest: fix cleanup logic
Upstream-commit: cdf61152bb58f6d10217434c1f976fcdea15110e
Component: engine
2016-06-01 08:42:19 -04:00
dd16c85f55 Merge pull request #23143 from bfirsh/remove-status-column-from-clinet-libraries-page
Remove status column from client libraries page
Upstream-commit: 74c7363965625848c32a5af80526fb65ecb26064
Component: engine
2016-06-01 13:45:28 +02:00
46e46eb95e cleanup logging driver documentation
This does a minor cleanup of the logging driver
documentation;

- Add a table-header to the driver-options
  table.
- Add language hints to code-blocks to
  prevent incorrect highlighting
- Wrap some code examples so that they
  fit in the default layout
- Wrap text to 80-chars
- Fix ordering in menu
- Some minor rewording

We should still create separate pages
for all available drivers (for example,
json-file, syslog, and GELF don't have
their own configuration page)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a9f6d93099283ee06681caae7fe29bd1b2dd4c77
Component: engine
2016-06-01 13:18:25 +02:00
ec0b8580b4 Fix racy tests in pkg/authorization
Fix #23012

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: f437e2d1485bfb64ac0ecc85ac3b14975e9f51f6
Component: engine
2016-06-01 03:25:56 +00:00