Docker Detached Mode

What is detached mode in the docker world? I read this article
Link, but it does not explain exactly what detached mode mean.

  • Docker Run command hangs
  • Create a kubernetes namespace using config instead of API
  • 502 Bad Gateway when accessing virtual host via Jwilder's Nginx proxy
  • Docker and Chromium net::ERR_NETWORK_CHANGED
  • Docker file mount understanding
  • Attach terminal and launch docker compose?
  • Run docker without “sudo” in Fedora 24
  • Configure Docker Daemon port to enable Docker APIs
  • Using a PostgreSQL database with Docker and Flask, how does it work?
  • Pull private docker images from Google Container Registry w/o gcloud
  • Docker 1.5 on IPv6 only host
  • Can't Unzip Files in Docker VM (Boot2Docker) / Windows 7 / CRC Error
  • One Solution collect form web for “Docker Detached Mode”

    You can start a docker container in detached mode with a -d option. So the container starts up and run in background. That means, you start up the container and could use the console after startup for other commands.

    The opposite of detached mode is foreground mode. That is the default mode, when -d option is not used. In this mode, the console you are using to execute docker run will be attached to standard input, output and error. That means your console is attached to the container’s process.

    In detached mode, you can follow the standard output of your docker container with docker logs -f <container_ID>.

    Just try both options. I always use the detached mode to run my containers. I hope I could explain it a little bit clearer.

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