title: What is Docker attach?
body: <p>I am very new to Docker and I have been able to understand 4 things</p>
  
  <ul>
  <li>Dockerfile</li>
  <li>Docker image</li>
  <li>Docker container</li>
  <li>docker-compose</li>
  </ul>
  
  <p>along with some basic commands like docker run, docker log etc.</p>
  
  <p>Now, I came across this command <code>docker attach</code> with a description here</p>
  
  <blockquote>
    <p>Use docker attach to attach to a running container using the container’s ID or name, either to view its ongoing output or to control it interactively. You can attach to the same contained process multiple times simultaneously, screen sharing style, or quickly view the progress of your detached process.`</p>
  </blockquote>
  
  <p>I have no idea what do they mean when they say we can attach if we want to view a container's <code>ongoing activity or output?</code> If I have a Container for a console application and I simply do <code>docker run</code> on it then I can see the output right there in the console window.</p>
  
  <p>What could be a few benefits of docker attach?</p>