title: Logstash in Docker - config file not found when mounted though a volume
body: <p><strong>EDIT:</strong> It seems to be a boot2docker thing... works fine in an ubuntu vm running docker.</p>
  
  <p>I'm trying to fire up logstash in a Docker container but when I mount the config file as a volume, it doesn't seem to find it. Interestingly, if I start up the container with bash, I can see the config file in there and running the same command as what docker would, it works.</p>
  
  <p><strong>Docker File</strong></p>
  
  <pre><code>FROM ubuntu:14.04
  MAINTAINER cvallance
  
  RUN apt-get update
  RUN apt-get -yqq install openjdk-7-jre
  RUN apt-get -yqq install curl
  RUN mkdir /opt/logstash \
    &amp;&amp; cd /opt/logstash \
    &amp;&amp; curl -O https://download.elastic.co/logstash/logstash/logstash-1.4.2.tar.gz \
    &amp;&amp; tar zxvf logstash-1.4.2.tar.gz
  
  CMD ["/opt/logstash/logstash-1.4.2/bin/logstash", "agent", "--verbose", "-f", "/etc/logstash/sample.conf"]
  </code></pre>
  
  <p><strong>Config file located at <code>$(pwd)/config/sample.conf</code></strong></p>
  
  <pre><code>input {
    stdin { }
  }
  
  output {
    stdout {
      codec =&gt; rubydebug
    }
  }
  </code></pre>
  
  <p><strong>Docker build command:</strong></p>
  
  <pre><code>docker build -t cvallance/logstash .
  </code></pre>
  
  <p><strong>Docker run command:</strong></p>
  
  <pre><code>docker run -ti -v $(pwd)/config:/etc/logstash cvallance/logstash
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>Error: No config files found:  /etc/logstash/sample.conf
  Can you make sure this path is a logstash config file?
  </code></pre>
  
  <p><strong>BUT</strong> if I run the same command inside the container from a bash session like so...</p>
  
  <pre><code>docker run -ti -v $(pwd)/config:/etc/logstash cvallance/logstash bash
  ...
  root@d3fd885903dd:/# /opt/logstash/logstash-1.4.2/bin/logstash agent --verbose -f /etc/logstash/sample.conf
  </code></pre>
  
  <p>Everything works as expected. I.e. input and output</p>
  
  <pre><code>testing
  {
         "message" =&gt; "testing",
        "@version" =&gt; "1",
      "@timestamp" =&gt; "2015-04-10T00:06:33.878Z",
            "host" =&gt; "d3fd885903dd"
  }
  </code></pre>