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.

  • Docker volume stops syncing
  • Mulitple Docker Containers on Port 80 with Same Domain
  • Elastic Beanstalk, Docker and Continuous integration
  • Access a docker containers own localhost inside that container — php apache
  • Can't run puma in daemon mode in docker
  • Access Wildfly-Docker-Container from Apache-Docker-Container
  • STDIN not getting attached to restarted docker container
  • Docker container published via port forward can't connect to its own published port
  • How to keep docker containers running when they are installed with ansible
  • Docker Volume without linking. What is the use case?
  • Private gems are not getting installed in docker
  • Docker container on windows server
  • 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.