Skip to main content
eilagcy

10 months ago

docker run options

How do we use the following options in docker run

--cidfile <file>

-a STDIN

-a STDOUT 

Image of johndavidmarx
johndavidmarx
10 months ago
The Docker reference is here:

https://docs.docker.com/engine/reference/run/#foreground

the --cidfile is to capture the image container id into a file, similar to a pid in linux.

the -a STDIN and -a STDOUT is to attach to standard in and standard out. This give you a way to perhaps see standard out but not have the instance attached to standard in and standard out. If you don't run -d for detached then both standard in and standard out are attached to the container runtime instance. Hope this help -John


Image of eilagcy
eilagcy
10 months ago
Hi
Thanks for the information, can you help with an example to understand it better.
Regards, anuraag