Commit Graph

24579 Commits

Author SHA1 Message Date
Yong Tang 678c80f925 Skip UTF-8 BOM bytes from Dockerfile if exists
This fix tries to address issues in #23221 where Dockerfile
may consists of UTF-8 BOM. This likely happens when Notepad
tries to save a file as UTF-8 in Windows.

This fix skips the UTF-8 BOM bytes from the beginning of the
Dockerfile if exists.

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

This fix fixes #23221.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-03 06:16:50 -07:00
Sebastiaan van Stijn 020a86b3d9 Merge pull request #23107 from yongtang/23055-docker-search-limit
Add `--limit` option to `docker search`
2016-06-03 14:25:42 +02:00
Vincent Demeester 9c1278b279 Merge pull request #23111 from yongtang/20083-dockerignore-comment
Add support for comments in .dockerignore
2016-06-03 14:23:09 +02:00
Sebastiaan van Stijn f1755b2560 Merge pull request #23227 from yongtang/06032016-engine-api
Vendor engine-api to 5d8739372315f8147ceb7bcc53576893ff96ffc6
2016-06-03 14:15:31 +02:00
Sebastiaan van Stijn 613286859f Merge pull request #23230 from thaJeztah/carry_make_install_binary
[carry 22927] Add `make install` task
2016-06-03 13:53:42 +02:00
Sebastiaan van Stijn 766550385d Merge pull request #22715 from allencloud/add-trace-http-pprof
add trace in docker engine's pprof to show execution trace in binary form
2016-06-03 13:22:13 +02:00
Vincent Demeester d349f45dcc Merge pull request #23231 from thaJeztah/minor-mailmap-update
Fix double entry in authors
2016-06-03 12:44:05 +02:00
Sebastiaan van Stijn 0829581d7e
Fix double entry in authors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-06-03 12:40:36 +02:00
Brian Goff 9bb54f89ad
Add `make install` task
This installs docker and dockerd to `$DOCKER_MAKE_INSTALL_PREFIX/bin`, which
defaults to `/usr/local/bin`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-06-03 12:08:33 +02:00
Yong Tang 10c35196b1 Vendor engine-api to 5d8739372315f8147ceb7bcc53576893ff96ffc6
This fix tries to update engine-api to 5d8739372315f8147ceb7bcc53576893ff96ffc6

This fix brings engine-api up to date, which includes changes from:
https://github.com/docker/engine-api/pull/256
https://github.com/docker/engine-api/pull/254

This fix is related to

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-03 02:27:17 -07:00
Sebastiaan van Stijn a11d40af9b Merge pull request #23173 from thaJeztah/update-authors
Update mailmap and re-generate Authors
2016-06-03 10:20:33 +02:00
Arnaud Porterie b16f735e90 Merge pull request #23220 from icecrime/bump_etcd_2.3.2
Bump etcd to 2.3.2
2016-06-02 22:04:35 -07:00
Yong Tang 92f10fe228 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>
2016-06-02 19:12:20 -07:00
Yong Tang 8913dace34 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>
2016-06-02 19:06:52 -07:00
Sven Dowideit 98c245c9e6 Merge pull request #23193 from allencloud/fix-typos
use grep to find all a/an typos
2016-06-02 18:45:08 -07:00
Arnaud Porterie f02ffd9e19 Bump etcd to 2.3.2
Bump etcd to 2.3.2 and `github.com/ugorji/go` accordingly.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2016-06-02 18:35:45 -07:00
Sven Dowideit e2528712db Merge pull request #23192 from orsenthil/docfixes/ubuntu_install
Fix the docker daemon restart command for ubuntu.
2016-06-02 18:05:49 -07:00
Sven Dowideit 9be8f04950 Merge pull request #22763 from zreigz/doc-multiple-daemons
Add documentation for running multiple daemons
2016-06-02 18:01:02 -07:00
Brian Goff 850031c581 Merge pull request #23026 from rhatdan/mkdir
Need to create bind mount volume if it does not exist.
2016-06-02 20:45:33 -04:00
Brian Goff 94b2d3554c Merge pull request #23136 from nalind/logscmd_read_journald_attrs
Add support for reading journal extras details, and setting timestamps to UTC
2016-06-02 20:42:24 -04:00
Michael Crosby ce255f76c7 Add User defined Healthchecks for Containers
Carry of #22719
2016-06-02 16:58:34 -07:00
Sebastiaan van Stijn 76d8b0dab7
Bump engine-api to fa04f66c7871183dd53a5ec666479f49b452743d
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-06-03 00:14:55 +02:00
Thomas Leonard b6c7becbfe
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>
2016-06-02 23:58:34 +02:00
Brian Goff d1b1b6a98e Merge pull request #23212 from LK4D4/remove_unused_var
pkg/parser/kernel: remove unused var block
2016-06-02 16:30:05 -04:00
Vincent Demeester eb9274844e Merge pull request #23140 from Microsoft/HcsshimRevendor
Revendor hcsshim
2016-06-02 22:09:19 +02:00
Sebastiaan van Stijn 4399d3b309 Merge pull request #23206 from mlaventure/fix-release-deb
Fix release-deb script
2016-06-02 21:22:49 +02:00
Sebastiaan van Stijn 791f98290e Merge pull request #22806 from errordeveloper/master
Remove MountFlags in systemd unit to allow shared mount propagation
2016-06-02 20:04:08 +02:00
Alexander Morozov 6e5894b551 pkg/parser/kernel: remove unused var block
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-06-02 10:50:36 -07:00
Alexander Morozov 34f54b3a11 Merge pull request #22549 from allencloud/make-pkg-parsers-support-darwin
add darwin support in package docker/pkg/parsers
2016-06-02 10:48:19 -07:00
Alexander Morozov cb8e7470be Merge pull request #23208 from vdemeester/update-engine-api
Bump engine api to 009ba16
2016-06-02 09:30:57 -07:00
Kenfe-Mickael Laventure afc2579d1a Fix release-deb script
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-02 08:53:33 -07:00
Vincent Demeester f69353a364 Merge pull request #23153 from AkihiroSuda/fix23152PkgGitutils
Fix gitconfig dependency in pkg/gitutils.TestCheckoutGit
2016-06-02 17:21:38 +02:00
Vincent Demeester 09033b8df2 Merge pull request #23179 from kerneltime/master
Add VMware Docker Volume Plugin.
2016-06-02 17:05:32 +02:00
Vincent Demeester 6b7f12650d
Update ContainerStart calls to use options now
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-02 16:56:13 +02:00
Vincent Demeester 8ea051f012
Update engine-api to 009ba1641d669613b38818f6f6385b0e74c5728f
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-02 16:55:49 +02:00
Nalin Dahyabhai 0da0a8f9da Add support for reading journal extras and in UTC
When told to read additional attributes from logs that we've sent to the
journal, pull out all of the non-trusted, non-user fields that we didn't
hard-code ourselves.  More of PR#20726 and PR#21889.

When reading entries in the journald log reader, set the time zone on
timestamps that we read to UTC, so that we send UTC values to the client
instead of values that are local to whatever timezone dockerd happens to
be running in.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
2016-06-02 10:17:07 -04:00
Sebastiaan van Stijn 80b3e9e810 Merge pull request #23183 from caarlos0/permissions
Removed exec permissions from Dockerfile.windows
2016-06-02 16:10:37 +02:00
Sebastiaan van Stijn 171af54931 Merge pull request #22460 from jwhonce/wip/sigpipe
Ignore SIGPIPE events
2016-06-02 16:05:22 +02:00
Sebastiaan van Stijn 0aeac288a3 Merge pull request #23161 from AkihiroSuda/rename-misleading-function-name
daemon: Rename copy to copyFunc
2016-06-02 15:31:08 +02:00
Dan Walsh 322cc99c69 Need to create bind mount volume if it does not exist.
In order to be consistent on creation of volumes for bind mounts
we need to create the source directory if it does not exist and the
user specified he wants it relabeled.

Can not do this lower down the stack, since we are not passing in the
mode fields.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-06-02 07:14:17 -04:00
Vincent Demeester 22aca92ee3 Merge pull request #23121 from unclejack/disallow_ecryptfs_aufs
aufs,overlay: disable on eCryptfs
2016-06-02 12:54:43 +02:00
Vincent Demeester 69545fe19d Merge pull request #23190 from AkihiroSuda/addendum23141
Fix the comment for daemon/logger.Copier
2016-06-02 12:21:52 +02:00
allencloud c1be45fa38 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-02 17:17:22 +08:00
Akihiro Suda efc250bc6b Fix gitconfig dependency in pkg/gitutils.TestCheckoutGit
Fix #23152

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-06-02 17:44:09 +09:00
Vincent Demeester b02acfcbe0 Merge pull request #23197 from coolljt0725/cleanup_comment
cleanup: clean up commented code in daemon/stats.go
2016-06-02 10:12:10 +02:00
Lei Jitang 2d9c022946 cleanup: clean up commented code in daemon/stats.go
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-06-02 14:39:12 +08:00
Senthil Kumaran 53a1de2b16 Fix the docker daemon restart command for ubuntu.
Signed-off-by: Senthil Kumaran <senthil@uthcode.com>
2016-06-01 22:32:35 -07:00
Akihiro Suda 8bce6265fc 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>
2016-06-02 13:30:20 +09:00
Akihiro Suda 518709a87e 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>
2016-06-02 13:10:51 +09:00
allencloud a7f551359a make pkg/parsers support darwin and solaris
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-02 11:47:27 +08:00