I am reading the spec of the run command and see the following:
-i : Keep STDIN open even if not attached
and
-a=[] : Attach to
STDIN,STDOUTand/orSTDERR
and
You can specify to which of the three standard streams (STDIN, STDOUT, STDERR) you’d like to connect
But I lack of understanding: what does it mean to "connect a container to a standard stream?"
Can somebody explain?
What does for example the -i parameter do?
Well, STDIN (Standard Input), STDOUT (Standard Output), STDERR (Standard Error) are three standard stream.
Normally, STDIN means keyboard, STDOUT and STDERR mean the direct screen display.
So, if you want to give your container some input from keyboard, you need to connect it to the STDIN. And if you want your container print the result on the screen, you may need to connect it to STDOUT and STDERR.
Otherwise, your container can run in the background. Input may come from, say, network and output may be stored in a log file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With