Add the capability to cancel the build by disconnecting the client. This adds a `cancelled` channel which is used to signal that a build should halt. The build is halted by sending a Kill signal and noticing that the cancellation channel is closed. This first pass implementation does not allow cancellation during a pull, but that will come in a subsequent PR. * Add documentation of cancellation to cli and API * Protect job cancellation with sync.Once * Add TestBuildCancelationKillsSleep * Add test case for build cancellation of RUN statements. Signed-off-by: Peter Waller <p@pwaller.net> Upstream-commit: 671c12204cb469d868f646da1474d5bad6541770 Component: engine
This directory contains code pertaining to the Docker API:
-
Used by the docker client when communicating with the docker daemon
-
Used by third party tools wishing to interface with the docker daemon