Docker: understanding it
It’s common to see docker run -it or docker run -itd, but what do those arguments actually mean?
i is for interactive §
- Lets you send input to the container through STDIN.
- Most often
-iis used with-t, to create an interactive terminal session. - Enable with
-ior--interactive(docs).
t is for TTY §
- Attaches a pseudo-TTY to the container.
- It is rarely useful to use
-twithout-i. - Enable with
-tor--tty(docs).
d is for detach §
- Starts the container as a background process that doesn’t occupy the terminal window.
- Enable with
-dor--detach(docs).