title: redirect log files created in a docker container to stdout / stderr
body: <p>I have the following Dockerfile:</p>
  
  <pre><code>FROM ubuntu:16.04
  RUN apt-get update
  VOLUME ["/LOGS"]
  COPY ./testServer .
  ENTRYPOINT ./testServer 8600
  </code></pre>
  
  <p>"testServer" has log files that are being written to. They are located in the directory "LOGS". Each time "testServer" is started, a new log is created. What I wanted to do was to "tail" the latest log file in the directory to stdout / stderr.</p>
  
  <p>I tried adding:</p>
  
  <pre><code>CMD ["/bin/sh", "-c", "tail $( ls -Art /LOGS | tail -n 1 ) &gt; out_server.log 2&gt;&amp;1"]
  </code></pre>
  
  <p>to the Dockerfile (and rebuilt the image thereafter) but it did not work.</p>
  
  <p>How can this be done?</p>
  
  <p>TIA</p>