Home > other >  The docker - t - I doubt
The docker - t - I doubt

Time:09-19

Usually when using the run or creat plus - t - I
For example: sudo docker run - ti ubuntu, and then enter the command interface

If not - ti, using the run or the create containers can be created successfully, the but how can start the container

So - ti add and do not add to generate container is there a difference? Why is this?

Although it's all about - t is assigned a pseudo terminal binding to the standard input, open - I keep container standard input

But still don't quite understand. Since created a ubuntu environment, start the container, you should automatically assigned into a terminal oh (why don't want to home - ti?)

CodePudding user response:

Background - it start is starting

CodePudding user response:

- t and sh, bash, used to use the tty device, don't add to bash as CMD can't start, even under - d,
-i was open directly to the end, under - d add don't add doesn't matter,
If the CMD is not bash, sh, so - I - t need not add

CodePudding user response:

-t terminal open
-i interaction interface

CodePudding user response:

If docker running inside a foreground process, otherwise we are out of the end
  • Related