title: Output of `tail -f` at the end of a docker CMD is not showing
body: <p>Using Docker for Mac 1.13.1 with the following Dockerfile: </p>
  
  <pre><code>FROM ubuntu:latest
  MAINTAINER docker@ekito.fr
  
  #Install packages and clean downloaded packages in the lowest layer
  RUN apt-get update &amp;&amp; apt-get -y install cron &amp;&amp; rm -rf /var/lib/apt/lists/*
  
  # Add crontab file in the cron directory
  ADD crontab /etc/cron.d/hello-cron
  
  # Give execution rights on the cron job and create the log file to tail in the next layer
  RUN chmod 0644 /etc/cron.d/hello-cron &amp;&amp; touch /var/log/cron.log
  
  # Run the command on container startup
  CMD echo "starting" &amp;&amp; echo "continuing" &amp;&amp; (cron) &amp;&amp; echo "tailing..."  &amp;&amp; tail -f /var/log/cron.log
  </code></pre>
  
  <p>With a contab file of: </p>
  
  <pre><code>* * * * * root echo "Hello world `date`" &gt;&gt; /var/log/cron.log 2&gt;&amp;1
  # Don't remove the empty line at the end of this file. It is required to run the cron job
  </code></pre>
  
  <p>When I build and run it with: </p>
  
  <pre><code>docker build -t docker-cron-master .
  docker run docker-cron-master
  </code></pre>
  
  <p>I see the output: </p>
  
  <pre><code>docker run docker-cron-master
  starting
  continuing
  tailing...
  </code></pre>
  
  <p>If I wait a minute the <code>tail -f</code> output doesn't appear. Yet if I login to the running container and tail the file I can see the contents: </p>
  
  <pre><code>$ docker exec -it 4eda6b1fc6ce bash
  root@4eda6b1fc6ce:/# tail -f /var/log/cron.log
  Hello world Fri May  5 09:53:01 UTC 2017
  Hello world Fri May  5 09:54:01 UTC 2017
  </code></pre>
  
  <p>I tried adding another echo at the end of the CMD to see if it was only the last command who's STDOUT was being swallowed but that didn't help. </p>
  
  <p>I have posted the code is on github at <a href="https://github.com/simbo1905/docker-cron" rel="noreferrer">https://github.com/simbo1905/docker-cron</a> </p>
  
  <p>Thanks!</p>