Two Logstash instances on same Docker container

Am wondering if there is a way two logstash processes with separate configurations can be run on a single Docker container.
My setup has a Logstash process using file as input sending events to Redis and from there to second Logstash process and over to custom http process. So, Logstash --> Redis --> Logstash --> Http. Was hoping to keep the two Logstash instances and Redis on the same Docker container. Am still new to Docker & Would highly appreciate any inputs / feedback on the same.

  • Kafka Endless NotLeaderForPartitionException for ReplicaFetcherThread
  • artifactory oss docker 5.0.0 upgraded to 5.1.0 now it won't start
  • tor browser in docker, how using with X or Wayland
  • Sharing data across containers
  • What would prevent code running in a Docker container from connecting to a database on a separate server?
  • How to setup default environment quickly in Docker?
  • Switch from Heroku to Docker on Digitalocean [Continuous Integration] [closed]
  • How do I uninstall docker-compose?
  • Docker Container npm global affect host or only container?
  • docker-compose - how to escape environment variables
  • Docker with Windows
  • How can I overcame this 500 Server Internal Error when trying to pull google/appengine-java image for Managed VMs?
  • One Solution collect form web for “Two Logstash instances on same Docker container”

    This would be more complicated than it needs to be. It is much simpler in the Docker world to run three containers to do three things than to run one container that does them all. It is possible though-

    You need to run an init process in your container to control multiple processes, and launch that as your container’s entry point. The init will have to know how to launch the processes you are interested in, both logstash and the redis. Basimage/phusion provides an image with a good init system, but the launch scripts are based on runit and can be hard to pick up.

    If you wanted to only run a single process, you can use a docker-compose file to launch all three processes and link them together.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.