Commit Graph

3355 Commits

Author SHA1 Message Date
f790d372b6 Update TestHttpsInfoRogueCert for Go 1.7
The error message changed from

  remote error: bad certificate

To

  remote error: tls: bad certificate

In Go 1.7, so just checking for "bad certificate"
to make this test work on both Go 1.6 and 1.7

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 496adadcec4ba00d230e546239ddc10e4ea41dcf
Component: engine
2016-06-04 14:17:24 +02:00
47fe12cae3 Merge pull request #23241 from vdemeester/migrate-search-to-cobra
Use spf13/cobra for docker search
Upstream-commit: 521f79bf0e81fdc5ff87ab207b834e2beef4e790
Component: engine
2016-06-03 22:07:08 -04:00
35da93382d Merge pull request #23234 from yongtang/23221-utf8-bom
Skip UTF-8 BOM bytes from Dockerfile and .dockerignore if exist
Upstream-commit: 2d40e36af89b24b03ec9a502652f713353cf600a
Component: engine
2016-06-03 22:28:48 +02:00
cb2dd312aa Use spf13/cobra for docker search
- Move image command search to `api/client/image/search.go`
- Use cobra :)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a11ef10631dd9338aeda2e10fedea365a7471af1
Component: engine
2016-06-03 19:50:01 +02:00
79342b784b Merge pull request #22898 from WeiZhang555/add-detach-event
Add detach event
Upstream-commit: c80a2f2937463882c2c38141a710f19b608125e6
Component: engine
2016-06-03 09:49:48 -07:00
ab25cb22b0 Skip UTF-8 BOM bytes from Dockerignore if exist
This fix tries to address issues related to #23221 where Dockerignore
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
Dockerignore if exists.

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

This fix is related to #23221 (UTF-8 BOM in Dockerfile).

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ea86320fcc61ea9ded3eef7ba01699c4e3ccf3ce
Component: engine
2016-06-03 07:26:36 -07:00
2c68691b95 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>
Upstream-commit: 678c80f9256021ce74184fdd6b612d9dea377fba
Component: engine
2016-06-03 06:16:50 -07:00
604319f9f2 Merge pull request #23107 from yongtang/23055-docker-search-limit
Add `--limit` option to `docker search`
Upstream-commit: 020a86b3d9e6b052a3f866b7517eb0f62fd24bea
Component: engine
2016-06-03 14:25:42 +02:00
57f1cfe3b1 Add detach event
If we attach to a running container and stream is closed afterwards, we
can never be sure if the container is stopped or detached. Adding a new
type of `detach` event can explicitly notify client that container is
detached, so client will know that there's no need to wait for its exit
code and it can move forward to next step now.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 83ad006d4724929ccbde4bdf768374fad0eeab44
Component: engine
2016-06-03 11:59:11 +08:00
82d7e1ba5d 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: 92f10fe228c1b4b527b87ac47401132322283ea3
Component: engine
2016-06-02 19:12:20 -07:00
3dff30ced8 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: 8913dace341c8fc9f9a3ab9518c8521c161b307f
Component: engine
2016-06-02 19:06:52 -07:00
5578aba972 Merge pull request #23193 from allencloud/fix-typos
use grep to find all a/an typos
Upstream-commit: 98c245c9e63793cf8ca03c5500e0820447c1861c
Component: engine
2016-06-02 18:45:08 -07: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
44649a5cdf Merge pull request #23140 from Microsoft/HcsshimRevendor
Revendor hcsshim
Upstream-commit: eb9274844efd5e08226a98de79f0f5237a6e2458
Component: engine
2016-06-02 22:09:19 +02:00
35c5774373 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: c1be45fa38e82054dcad606d71446a662524f2d5
Component: engine
2016-06-02 17:17:22 +08: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
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
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
93473dcef1 Use Args in cobra.Command to validate args.
Also re-use context.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fc5a4514fbe1b402d2a0bff170486ac3de4bf8cc
Component: engine
2016-05-31 15:43:16 -07:00
e8454769c2 Revendor hcsshim
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: d96e36cbbfb076f4adb967644e7d6e2da73eb0ec
Component: engine
2016-05-31 14:42:01 -07:00
041d2192d1 Update usage and help to (almost) match the existing docker behaviour
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 667dcb0e8e550d1a80ee67c6d71979e8cfabea1f
Component: engine
2016-05-31 14:41:37 -07:00
df33adb751 Merge pull request #22103 from coolljt0725/fix_22093
Fix docker create with duplicate volume failed to remove
Upstream-commit: edcc9577bf95c2eeaa15955e7b1c00a18cec7cb6
Component: engine
2016-05-30 15:57:13 +02:00
6240c16449 make the error message in TestRunSeccompDefaultProfile more precise
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: f80bfdf85ca3463f59c93bf73c484f42c308fa8b
Component: engine
2016-05-28 09:06:25 +08:00
084d431873 Split the Seccomp tests into two
The Seccomp tests ran 11 tests in parallel and this appears to be
hitting some sort of bug on CI. Splitting into two tests means that
I can no longer repeoduce the failure on the slow laptop where I could
reproduce the failures before.

Obviously this does not fix the underlying issue, which I will
continue to investigate, but not having the tests failing a lot
before the freeze for 1.12 would be rather helpful.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: cfca3255a83c7cbaeaa623617bf71688723b21aa
Component: engine
2016-05-27 15:38:29 -07:00
c18e25c7fa Merge pull request #22716 from jmzwcn/issue22466-patches
Embedded DNS problem after renaming container. Step2:change in docker…
Upstream-commit: 4441a6c4c68f6ec7acb0e2d92d72274fbf403425
Component: engine
2016-05-27 23:27:42 +02:00
b822217717 Merge pull request #22912 from duglin/FixImportTest
Fix docker import test
Upstream-commit: fd7ec4b9e58fe5ba4abab4f60b63552e11246f3c
Component: engine
2016-05-27 14:03:44 -07:00
561b16903d Merge pull request #22438 from yongtang/22420-inconsistent-tmpfs-behavior
Inconsistent --tmpfs behavior
Upstream-commit: ec3ccde18bb2b46f9d2e74fad61e7286aa292123
Component: engine
2016-05-27 15:54:37 -04:00
148efb277e Merge pull request #22376 from vdemeester/use-dockerd-in-integration-cli
Use dockerd instead of docker daemon in integration-cli
Upstream-commit: 01409bf069a4fbf8ebcbd27e2333a9d61d462138
Component: engine
2016-05-27 10:09:43 -07:00
d2f37ef500 Merge pull request #22984 from Microsoft/jjh/ttymessage
Better error on attach no tty
Upstream-commit: 24d2ee8c485dc2a580ee57e3afc076dda307e3c8
Component: engine
2016-05-27 16:57:36 +02:00
0e099055bb Inconsistent --tmpfs behavior
This fix tries to address the issue raised in #22420. When
`--tmpfs` is specified with `/tmp`, the default value is
`rw,nosuid,nodev,noexec,relatime,size=65536k`. When `--tmpfs`
is specified with `/tmp:rw`, then the value changed to
`rw,nosuid,nodev,noexec,relatime`.

The reason for such an inconsistency is because docker tries
to add `size=65536k` option only when user provides no option.

This fix tries to address this issue by always pre-progating
`size=65536k` along with `rw,nosuid,nodev,noexec,relatime`.
If user provides a different value (e.g., `size=8192k`), it
will override the `size=65536k` anyway since the combined
options will be parsed and merged to remove any duplicates.

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

This fix fixes #22420.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 397a6fefadf9ac91a5c9de2447f4dea607296470
Component: engine
2016-05-26 19:28:18 -07:00
5bcb28804b Merge pull request #22268 from Microsoft/jjh/continuationescape
Support platform semantic file paths through ESCAPE
Upstream-commit: 8e924153e219d040e3aa672df4e0c7baff9f8d8b
Component: engine
2016-05-26 10:00:56 -07:00
f408291a41 Use dockerd instead of docker daemon in integration-cli
Updating `integration-cli/daemon.go` to use `dockerd` instead of `docker
daemon` to start up the daemon.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f87053b9c387a5a577383c758dc901cb8bf539e2
Component: engine
2016-05-26 13:14:35 +02:00
898abb33e0 Embedded DNS problem after renaming container. Step2:change in docker/daemon side and add integration test
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
Upstream-commit: be072a89544300a484970fd95207bdb93c5c7d9e
Component: engine
2016-05-26 12:59:44 +08:00
611bbe573a Update port info on network connect/disconnect
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: f198dfd856ca6125ef50b11d9d698550d66c9d4e
Component: engine
2016-05-25 17:02:50 -07:00
c1a0ccd035 Better error on attach no tty
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f7541b00b0f68a52195ed9bac967f8f08d96aa51
Component: engine
2016-05-25 13:32:48 -07:00
0635a7e10b Merge pull request #22908 from vdemeester/7967-since-before-image-filters
Add before and since filter to images
Upstream-commit: 0fe4417a3b2c18714303f319224b74ec08674115
Component: engine
2016-05-25 20:15:23 +02:00
e94aa3f2ac Merge pull request #22943 from vdemeester/21769-fix-detach-keys
Fix escape-keys by preserving input if invalid
Upstream-commit: 60abc96acfeae1985f4f0e9e9b44376b75a235f0
Component: engine
2016-05-25 09:53:53 -07:00
ac5e68234e Merge pull request #22916 from duglin/FixNetTest
Fix flaky TestApiStatsNetworkStats test
Upstream-commit: 004ce6b57124c1a99348e1447ac9e00a970d1b34
Component: engine
2016-05-25 18:51:47 +02:00
504a2ff9e3 Merge pull request #22953 from Microsoft/jjh/TestRunWorkingDirectory
Windows: Fix TestRunWorkingDirectory
Upstream-commit: 8c70ab803c49816de8124703db6635e9c5c7ce25
Component: engine
2016-05-25 17:54:39 +02:00
6eea85e6f1 Merge pull request #22960 from justincormack/seccompdefnotarm
Do not run the seccomp tests that use default.json on non x86 architectures
Upstream-commit: 4d376e9cc265c098c7faf03d0e75c1164cbf24e0
Component: engine
2016-05-25 17:20:16 +02:00
9fc37c22c9 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: 750e16f57c0121aa8cdad1763f0bb6e54b8c6d75
Component: engine
2016-05-25 13:49:10 +02:00
3e8a3ed291 Merge pull request #22962 from normalfaults/b
fixed spelling error in windows.go
Upstream-commit: 2a4b4a813342294a6191425caba471a94c8a39f6
Component: engine
2016-05-25 12:21:08 +02:00
5912cc64b5 Merge pull request #22952 from tophj-ibm/multiarch_daemon_test_fix
Multi-arch: fix TestBuildOnDisabledBridgeNetworkDaemon
Upstream-commit: cd159fba8529efe70ea634842a024560dbfd3aec
Component: engine
2016-05-25 10:19:41 +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
b39fa693a7 Merge branch 'master' into b
Upstream-commit: 59bb86a964c38d0f2cc724c686803472bb48968b
Component: engine
2016-05-24 21:43:45 -04:00
3d16c1ca14 fixed spelling error in docker cli run test
Signed-off-by: Nirmal Mehta <nirmalkmehta@gmail.com>
Upstream-commit: f91acbaee452191f406d31e3f3fd44210aa17fbf
Component: engine
2016-05-24 21:43:22 -04:00
4d6727d7fe Do not run the seccomp tests that use default.json on non x86 architectures
The generated profile that we check in is for amd64 and i386 architectures
and does not work correctly on arm as it is missing required syscalls,
and also specifies the architectures that are supported. It works on
ppc64le at the moment but better to skip the test as it is likely to
break in future.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 75385dc216e784d24535326376352de03eaeb059
Component: engine
2016-05-24 17:47:30 -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
f99c99aaac Windows: Fix TestRunWorkingDirectory
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 257494bd0a017cad264609f1a77b9af3ab7f991c
Component: engine
2016-05-24 15:13:06 -07:00
2e5b933fb0 Multi-arch: fix TestBuildOnDisabledBridgeNetworkDaemon
Fixes the test by loading in the architecture specific busybox
image when the test daemon starts.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 7832e2ae82ae56e9719c6930b054f643285a79b3
Component: engine
2016-05-24 16:33:49 -04:00