Docker Concepts
Standard input and pseudo-terminal
Input openness and pseudo-terminal allocation are separate options. Piped input generally needs -i without -t; an interactive shell may need both. Terminal allocation can alter formatting and stream behavior. Neither flag independently grants elevated permissions. Use the reviewed preloaded BusyBox fixture and a disposable context. A pseudo-terminal can combine stdout and stderr; omit it for separate machine-readable streams.
Formal Syntax & Structure
docker syntaxdocker
docker run -i IMAGE COMMANDdocker exec -it CONTAINER COMMANDParameters & Attributes
| Name | Type | Description |
|---|---|---|
| -i | flag | Keep standard input available. |
| -t | flag | Allocate a pseudo-terminal. |
Working Example
Example Snippetdocker
printf 'apple\n' | docker run --rm -i --pull=never --network none --name bm-v04-pipe busybox:1.37 cat