@@ -882,6 +882,24 @@ public function imageSearch($term)
882882 /**
883883 * Sets up an exec instance in a running container id
884884 *
885+ * The TTY mode should be set depending on whether your command needs a TTY
886+ * or not. Note that toggling the TTY mode affects how/whether you can access
887+ * the STDERR stream and also has a significant impact on performance for
888+ * larger streams (relevant for 100 MiB and above). See also the TTY mode
889+ * on the `execStart*()` call:
890+ * - create=false, start=false:
891+ * STDOUT/STDERR are multiplexed into separate streams + quite fast.
892+ * This is the default mode, also for `docker exec`.
893+ * - create=true, start=true:
894+ * STDOUT and STDERR are mixed into a single stream + relatively slow.
895+ * This is how `docker exec -t` works internally.
896+ * - create=false, start=true
897+ * STDOUT is streamed, STDERR can not be accessed at all + fastest mode.
898+ * This looks strange to you? It probably is. See also the benchmarking example.
899+ * - create=true, start=false
900+ * STDOUT/STDERR are multiplexed into separate streams + relatively slow
901+ * This looks strange to you? It probably is. Consider using the first option instead.
902+ *
885903 * @param string $container container ID
886904 * @param string $cmd Command to run specified as an array of strings
887905 * @param boolean $tty TTY mode
0 commit comments