Logstash exits after successfully installing plugin with docker-compose exited with code 0

I am trying to run an Elastic stack and I am trying to install a logstash plugin within the docker compose file. I am getting the message that the plugin is installed successful and right after that the container exits with code 0.

Here is my docker compose file :-

version: '3.7'

services:
Elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.15.1
ports:
- '9200:9200'
environment:
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1

logstash:
image: docker.elastic.co/logstash/logstash:7.15.1
command: /usr/share/logstash/bin/logstash-plugin install logstash-integration-jdbc
ports:
- '5000:5000'
volumes:
- type: bind
source: /opt/data/magiluser/logstash/
target: /usr/share/logstash/pipeline
read_only: true

kindly let me kow how to fix this

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