docker run options

How do we use the following options in docker run

--cidfile <file>

-a STDIN

-a STDOUT 

  • post-author-pic
    John M
    12-05-2018

    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


  • post-author-pic
    Anuraag C
    12-06-2018

    Hi

    Thanks for the information, can you help with an example to understand it better.
    Regards, anuraag

Looking For Team Training?

Learn More