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.

  • Vagrant & Docker: The container started never left the “stopped” state
  • In a Docker Compose multi-container application, how to prevent Postgres from running statements previously issued
  • What are the minimum requirements of neo4j?
  • TLS verification issue when setting up remote docker interpreter in pycharm in Windows
  • Determine if new docker container available on docker hub
  • Docker php set up installing pdo extension
  • Dropwizard and Docker: yaml configuration didn't change default ports
  • How to install old version (1.8.3) of docker on OS-X?
  • Mupx deployment fails. Why?
  • Dockerfile setting ENV in different file
  • Unable to access my web2py app login page by running docker container using gae
  • Addressing issues with Apache Spark application run in Client mode from Docker container
  • 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.