February 2019
Intermediate to advanced
240 pages
5h 25m
English
When you start your application with Compose in the default, attached mode—in other words, without the -d option—Compose connects to each container’s stdout, tailing the output.
When you press Ctrl-C, Compose is supposed to instruct the containers to terminate by sending the main process the SIGTERM signal. The process should exit gracefully and then the container should terminate. When this happens correctly, the Compose output on pressing Ctrl-C is:
| | Killing myapp_web_1 ... done |
| | Gracefully stopping... (press Ctrl+C again to force) |
However, maybe 10–50 percent of the time for me, instead of the containers shutting down gracefully, we get this:
| | ^CERROR: Aborting. |
and the termination fails, leaving ...