understanding what Docker stdin and stdout mean

I was just going through Docker run documentation and came across the following command:

docker run -a stdin -a stdout -i -t ubuntu /bin/bash

The documentation can be found HERE.

  • Deleting images from a private docker registry
  • “500 Internal Server Error” when pushing docker images using gcloud and a service account with “Owner” permission
  • How to call 'docker swarm unlock' non-interactively?
  • Updating PATH environment variable permanently in Docker container
  • Custom fonts in rrdgraph in a Docker container running Alpine Linux
  • Docker Datacenter: Error x509 certificate signed by unknown authority UCP 2.0.0 and DTR 2.1.0 with external certificates
  • can somebody tell me, is the stdin and stdout stand for ?

    I found this thread HERE, but its related to python , can anybody explain this to me in the context of Docker and ofcourse ubuntu ?

    Thank you.

  • Importance of the place of CMD in Dockerfile
  • Cannot start Spark in Docker container
  • Move file downloaded in Dockerfile to harddrive
  • Concourse pending for long time before running task
  • docker daemon -H fd:// error out in shell
  • Why isn't Kubernetes service DNS working on Docker Multinode?
  • One Solution collect form web for “understanding what Docker stdin and stdout mean”

    In general they are same as what you have mentioned and read in reference links for python. streams for receiving or reading input(stdin) and printing output(stdout). Example input from the keyboard or printing output to unix terminal. one reference here.

    By default docker attaches all streams to docker container (in foreground mode). If you choose to override say, in below command I only attach “stdout”

    docker run -a stdout -i -t centos /bin/bash

    This will only attach to stdout and hence I will not be able to type anything on this terminal, but could see print(input and output) from other terminal session of docker container (example when we login to docker container using command : docker attach ).

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.