I have been readying here and there online but the answer does not come thoroughly explained. I hope this question here if answered, can provide an updated and thorough explanation of the matter.
Why would someone define a container with the following parameters:
stdin: true
tty: true
Also if
`docker run -it`
bind the executed container process to the calling client stdin and tty, what would setting those flag on a container bind its executed process it to ?
I could only envision one scenario, which is, if the command is let say bash, then you can attach to it (i.e. that bash running instance) later after the container is running.
But again one could just run docker run it
when necessary. I mean one launch a new bash and do whatever needs to be done. No need to attach to a running one
So the first part of the question is:
a) What is happening under the hood ?
b) Why and when to use it, what difference does it make and what is the added value ?
question from:
https://stackoverflow.com/questions/65915849/understanding-stdin-true-tty-true-on-a-kubernetes-container 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…