# Logstash docker file input and file output

**URL:** <https://discuss.elastic.co/t/logstash-docker-file-input-and-file-output/94666>\
**Category:** Logstash\
**Created:** [July 26, 2017, 4:41pm UTC](https://discuss.elastic.co/t/logstash-docker-file-input-and-file-output/94666 "2017-07-26T16:41:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sslv](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sslv](https://discuss.elastic.co/u/sslv)\
**Post date:** [July 26, 2017, 4:41pm UTC](https://discuss.elastic.co/t/logstash-docker-file-input-and-file-output/94666/1 "2017-07-26T16:41:38Z")

</div>

Hi,  
I am new to Logstash, trying my hand with docker image.  
I have followed instructions from official documentation and was able to pull the image successfully.

Through this command:  
docker run --rm -it -v C:\Users\xyz\Desktop\Docker:/usr/share/logstash/pipeline/ [docker.elastic.co/logstash/logstash:5.5.1](http://docker.elastic.co/logstash/logstash:5.5.1)

I understood that I am mapping configuration folder of pipeline to "C:\Users\xyz\Desktop\Docker" folder on my windows PC.

But my question is I have to give a file input to Logstash docker and want it to write back to a file.  
What path should I mention inside configuration file to read logs. and how do i make it available to Logstash docker to read and write from?

---

<div class="post-metadata">

**Author:** ![sslv](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sslv](https://discuss.elastic.co/u/sslv)\
**Post date:** [July 26, 2017, 8:29pm UTC](https://discuss.elastic.co/t/logstash-docker-file-input-and-file-output/94666/2 "2017-07-26T20:29:12Z")

</div>

> [@sslv](#):
>
> docker run --rm -it -v C:\Users\xyz\Desktop\Docker:/usr/share/logstash/pipeline/ [docker.elastic.co/logstash/logstash:5.5.1](http://docker.elastic.co/logstash/logstash:5.5.1)

My bad wrong path.

> [@sslv](#):
>
> But my question is I have to give a file input to Logstash docker and want it to write back to a file.  
> What path should I mention inside configuration file to read logs. and how do i make it available to Logstash docker to read and write from?

mount the path you have your input files and output files using multiple "-v" and use those paths in pipeline conf file.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 26, 2017, 11:36pm UTC](https://discuss.elastic.co/t/logstash-docker-file-input-and-file-output/94666/3 "2017-07-26T23:36:54Z")

</div>

Thanks for sharing the solution! 😃

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 23, 2017, 11:37pm UTC](https://discuss.elastic.co/t/logstash-docker-file-input-and-file-output/94666/4 "2017-08-23T23:37:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
