linux - wouldn't specifying -t with -i be redundant for docker run? -
this post fleshes of out: confused docker -t option allocate pseudo-tty
but if "-i" gives me stdin stream , -t gives me whole terminal driver isn't -i redundant if use them together? or -t can only access via ssh if add -i can pipe input directly console?
i remember reading while ago in documentation. had , found:
for interactive processes (like shell), must use -i -t in order allocate tty container process. -i -t written -it you’ll see in later examples. specifying -t forbidden when client receiving standard input pipe, in:
in documentation. use --ti
lot , write ti
, guess thats why google search yields little result. documentation mentions it
lot not once mentions ti
the technical side of things
the op asked me go bit more detail here is...
the -i
flag means "interactive" (replaceable --interactive well). basically means shell remain open if has nothing do. (e.g waiting user input).
an example of interactive shell standard terminal window / command prompt. stay open , wait input (e.g interaction), upon receiving input executes task.
an example of non-interactive shell simple bash script. script run won't offer interaction shell. (although it's possible emulate interactive shell read statement.
specifying -t without -i therefor mean tty immediatelly disband, seeing wouldn't "run" , since didn't start interactively won't wait input.
more info interactive vs non-interactive can found here.
Comments
Post a Comment