title: Configuring Logstash for Docker
body: <p>I'm new in Docker and I'm having problems running a simple logstash.conf with Docker.</p>
  
  <p>My Dockerfile:</p>
  
  <pre><code>FROM docker.elastic.co/logstash/logstash:5.0.0
  RUN rm -f ~/desktop/docker_logstash/logstash.conf
  </code></pre>
  
  <p>Logstash.conf:</p>
  
  <pre><code>input {
      file {
          path =&gt; "~/desktop/filename.log"
          start_position =&gt; "beginning"
          sincedb_path =&gt; "/dev/null"
      }
  
  }
  
  filter {
      grok {
          match =&gt; {
              "message" =&gt; "%{COMBINEDAPACHELOG}"
          }
      }
  
  
  
  }
  
  output {
      stdout {
          codec =&gt; rubydebug
      }
  }
  </code></pre>
  
  <p>Docker commands:</p>
  
  <pre><code>docker build -t logstashexample .
  docker run logstashexample
  </code></pre>
  
  <p>I can build the container but when I run it it is stuck on:</p>
  
  <blockquote>
    <p>Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties. 
    [2017-11-22T11:08:23,040][INFO][logstash.inputs.beats    ] Beats inputs: Starting input listener {:address=>"0.0.0.0:5044"} 
    [2017-11-22T11:08:24,501][INFO][logstash.pipeline        ] Starting pipeline {"id"=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>125}
    [2017-11-22T11:08:24,520][INFO ][logstash.pipeline        ] Pipeline main started [2017-11-22T11:08:24,593][INFO][org.logstash.beats.Server] Starting server on port: 5044
    [2017-11-22T11:08:25,054][INFO ][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}</p>
  </blockquote>
  
  <p>What am I doing wrong? Thanks.</p>