From d82196393d9e30a41a243da5069de421490c2492 Mon Sep 17 00:00:00 2001 From: Arnaud Porterie Date: Fri, 5 Dec 2014 16:50:56 -0800 Subject: [PATCH] Forbid client piping to tty enabled container Forbid `docker run -t` with a redirected stdin (such as `echo test | docker run -ti busybox cat`). Forbid `docker exec -t` with a redirected stdin. Forbid `docker attach` with a redirect stdin toward a tty enabled container. Signed-off-by: Arnaud Porterie Upstream-commit: 76daef2b9a022d26594280215fce4cef80df8dd6 Component: cli --- components/cli/docs/sources/reference/run.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/cli/docs/sources/reference/run.md b/components/cli/docs/sources/reference/run.md index 8ac9f9d789..74a567c00b 100644 --- a/components/cli/docs/sources/reference/run.md +++ b/components/cli/docs/sources/reference/run.md @@ -94,9 +94,10 @@ specify to which of the three standard streams (`STDIN`, `STDOUT`, $ sudo docker run -a stdin -a stdout -i -t ubuntu /bin/bash -For interactive processes (like a shell) you will typically want a tty -as well as persistent standard input (`STDIN`), so you'll use `-i -t` -together in most interactive cases. +For interactive processes (like a shell), you must use `-i -t` together in +order to allocate a tty for the container process. Specifying `-t` is however +forbidden when the client standard output is redirected or pipe, such as in: +`echo test | docker run -i busybox cat`. ## Container identification