title: docker run, docker exec and logs
body: <p>If I do :</p>
  
  <pre><code>docker run --name nginx -d nginx:alpine /bin/sh -c 'echo "Hello stdout" &gt; /dev/stdout'
  </code></pre>
  
  <p>I can see "Hello stdout" when I do :</p>
  
  <pre><code>docker logs nginx
  </code></pre>
  
  <p>But when the container is running (docker run --name nginx -d nginx:alpine) and I do :</p>
  
  <pre><code>docker exec nginx /bin/sh -c 'echo "Hello stdout" &gt; /dev/stdout'
  </code></pre>
  
  <p>or when I attach the container with :</p>
  
  <pre><code>docker exec -it nginx /bin/sh
  </code></pre>
  
  <p>and then :</p>
  
  <pre><code>echo "Hello stdout" &gt; /dev/stdout
  </code></pre>
  
  <p>I can't see anything in docker logs. And since my Nginx access logs are redirected to /dev/stdout, I can't see them as well.</p>
  
  <p>What is happening here with this stdout ?</p>