Merge pull request #671 from infosiftr/logstash-dockerfile

Add an example Dockerfile to logstash
This commit is contained in:
yosifkit 2016-08-22 16:52:11 -07:00 committed by GitHub
commit 2404d03c1e
1 changed files with 18 additions and 0 deletions

View File

@ -23,3 +23,21 @@ If you need to run logstash with a configuration file, `logstash.conf`, that's l
```console
$ docker run -it --rm -v "$PWD":/config-dir logstash -f /config-dir/logstash.conf
```
### Using a `Dockerfile`
If you'd like to have a production Logstash image with a pre-baked configuration file, use of a `Dockerfile` is recommended:
```dockerfile
FROM logstash
COPY logstash.conf /some/config-dir/
CMD ["-f", "/some/config-dir/logstash.conf"]
```
Then, build with `docker build -t my-logstash .` and deploy with something like the following:
```console
$ docker run -it --rm my-logstash
```