1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/builder/dockerfile
Josh Hawn 4921171587 Update ContainerWait API
This patch adds the untilRemoved option to the ContainerWait API which
allows the client to wait until the container is not only exited but
also removed.

This patch also adds some more CLI integration tests for waiting for a
created container and waiting with the new --until-removed flag.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Handle detach sequence in CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Update Container Wait Conditions

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Apply container wait changes to API 1.30

The set of changes to the containerWait API missed the cut for the
Docker 17.05 release (API version 1.29). This patch bumps the version
checks to use 1.30 instead.

This patch also makes a minor update to a testfile which was added to
the builder/dockerfile package.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Remove wait changes from CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address minor nits on wait changes

- Changed the name of the tty Proxy wrapper to `escapeProxy`
- Removed the unnecessary Error() method on container.State
- Fixes a typo in comment (repeated word)

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Use router.WithCancel in the containerWait handler

This handler previously added this functionality manually but now uses
the existing wrapper which does it for us.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Add WaitCondition constants to api/types/container

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

- Update ContainerWait backend interface to not return pointer values
  for container.StateStatus type.
- Updated container state's Wait() method comments to clarify that a
  context MUST be used for cancelling the request, setting timeouts,
  and to avoid goroutine leaks.
- Removed unnecessary buffering when making channels in the client's
  ContainerWait methods.
- Renamed result and error channels in client's ContainerWait methods
  to clarify that only a single result or error value would be sent
  on the channel.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Move container.WaitCondition type to separate file

... to avoid conflict with swagger-generated code for API response

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2017-05-16 15:11:39 -07:00
..
command Builder default shell 2016-06-03 13:54:31 -07:00
parser MAINTAINER deprecation follow up. Relates to #25466 2017-04-18 16:44:33 -05:00
bflag.go Change builder.dispatchers to use a dispatchRequest object 2017-04-24 14:21:19 -04:00
bflag_test.go use t.Fatal() to output the err message where the values used for formatting 2017-02-23 10:16:22 +08:00
buildargs.go Fix warning for unused build args. 2017-05-09 11:25:33 -04:00
buildargs_test.go Fix warning for unused build args. 2017-05-09 11:25:33 -04:00
builder.go Refactor imageContexts into two different structs. 2017-05-10 17:59:30 -04:00
builder_test.go Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
builder_unix.go Builder default shell 2016-06-03 13:54:31 -07:00
builder_windows.go Builder default shell 2016-06-03 13:54:31 -07:00
dispatchers.go Fix resetting image metadata between stages for scratch case 2017-05-12 12:00:55 -07:00
dispatchers_test.go Refactor imageContexts into two different structs. 2017-05-10 17:59:30 -04:00
dispatchers_unix.go Cleanup in dispatcher.env 2017-04-11 14:44:28 -04:00
dispatchers_unix_test.go Builder dispatchers unit tests 2016-07-12 07:40:25 +02:00
dispatchers_windows.go Cleanup in dispatcher.env 2017-04-11 14:44:28 -04:00
dispatchers_windows_test.go Use filepath.Clean in normaliseWorkdir for windows 2016-10-31 13:27:05 -07:00
envVarTest Minor tweaks to quotes in env vars 2017-04-12 12:20:14 -07:00
evaluator.go Fix resetting image metadata between stages for scratch case 2017-05-12 12:00:55 -07:00
evaluator_test.go Some refactoring of dispatch() 2017-05-04 17:11:08 -04:00
evaluator_unix.go Enabling expose support for Windows TP5 2016-03-30 17:25:41 -07:00
evaluator_windows.go Windows: Allow user in builder 2016-11-14 14:10:47 -08:00
imagecontext.go Refactor imageContexts into two different structs. 2017-05-10 17:59:30 -04:00
internals.go Update ContainerWait API 2017-05-16 15:11:39 -07:00
internals_test.go Extract squash and tagging from the Dockerfile builder. 2017-05-01 12:07:32 -04:00
internals_unix.go Windows: Fix wildcard expansion after slash in filename 2016-09-14 11:40:57 -07:00
internals_windows.go Windows: Fix wildcard expansion after slash in filename 2016-09-14 11:40:57 -07:00
internals_windows_test.go Windows: Reduce CLI time, move some to unit tests 2016-05-06 12:26:08 -07:00
metrics.go Add extra prometheus metrics 2017-05-09 01:04:40 -07:00
mockbackend_test.go Update ContainerWait API 2017-05-16 15:11:39 -07:00
shell_parser.go Create a new ShellLex struct which provides the expected interface to Builder. 2017-04-26 19:39:16 -04:00
shell_parser_test.go Create a new ShellLex struct which provides the expected interface to Builder. 2017-04-26 19:39:16 -04:00
support.go Builder default shell 2016-06-03 13:54:31 -07:00
support_test.go Unit tests for builder/dockerfile/support 2016-04-16 00:19:58 +02:00
utils_test.go Reimplement integration test for symlink Dockerfile as a unit test 2016-06-14 23:07:19 +02:00
wordsTest Minor tweaks to quotes in env vars 2017-04-12 12:20:14 -07:00