Below steps helps to launch a logstash machine with Doker file.
Step 1: Install Docker
>> sudo apt-get install docker-ce (for ubuntu)
Step 2: Lets create a folder docker-image
Step 3: create a file called Docker with below scripts:
FROM docker.elastic.co/logstash/logstash:6.2.2
RUN rm -f /usr/share/logstash/pipeline/logstash.conf # (optional)
RUN mkdir -p ADD /usr/share/logstash/template # (optional)
COPY your_pipeline.conf /usr/share/logstash/pipeline/your_pipeline.conf
CMD ["/usr/share/logstash/bin/logstash", "-f", "/usr/share/logstash/pipeline/your_pipeline.conf"]
Step 4: Navigate to Dockerfile location and run below command in terminal:
>> docker build -t test_logstash:v1 <docker dir>
Step 5: Run >> docker run test_logstash:v1 or <image id>
Step 1: Install Docker
>> sudo apt-get install docker-ce (for ubuntu)
Step 2: Lets create a folder docker-image
Step 3: create a file called Docker with below scripts:
FROM docker.elastic.co/logstash/logstash:6.2.2
RUN rm -f /usr/share/logstash/pipeline/logstash.conf # (optional)
RUN mkdir -p ADD /usr/share/logstash/template # (optional)
COPY your_pipeline.conf /usr/share/logstash/pipeline/your_pipeline.conf
CMD ["/usr/share/logstash/bin/logstash", "-f", "/usr/share/logstash/pipeline/your_pipeline.conf"]
Step 4: Navigate to Dockerfile location and run below command in terminal:
>> docker build -t test_logstash:v1 <docker dir>
Step 5: Run >> docker run test_logstash:v1 or <image id>