title: docker logs doesn't log detached exec
body: <p>My Dockerfile is</p>
  
  <pre><code>FROM node:4
  
  RUN npm install -g yarn
  
  WORKDIR /app
  </code></pre>
  
  <p>I run <code>docker run -d</code> and mount my current working directory as a volume. All the deps are installed by <code>yarn</code>. I have a npm script to lint the files.</p>
  
  <p>If I do <code>docker exec -it [container] npm run lint</code> it works as expected and I can see all the logs. But if I do <code>docker exec -itd [container] npm run lint</code>, it exits immediately which is expected. But I can't see the logs by running <code>docker logs [container]</code>. How do I reattach the exec or just see to the logs? </p>
  
  <p>I tried <code>docker attach [container]</code> it goes to the repl of nodejs. Why is that?</p>