What does it mean to attach a tty/std-in-out to dockers or lxc?

stdin, stdout, and ttys are related concepts. stdin and stdout are the input and output streams of a process. A pseudo terminal (also known as a tty or a pts) connects a user’s “terminal” with the stdin and stdout stream, commonly (but not necessarily) through a shell such as bash. I use quotes around “terminal” since we really don’t use a terminal in the same sense today.

In the case of docker, you’ll often use -t and -i together when you run processes in interactive mode, such as when starting a bash shell. In the case of the shell you want to be able to issue commands and read the output.

The code docker uses to attach stdout/stdin has all the dirty details.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)