1
0
mirror of https://github.com/docker/cli.git synced 2026-01-22 03:22:01 +03:00

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 <arnaud.porterie@docker.com>
Upstream-commit: 76daef2b9a
Component: cli
This commit is contained in:
Arnaud Porterie
2014-12-05 16:50:56 -08:00
committed by Tibor Vass
parent c804d95895
commit d82196393d

View File

@@ -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