Docker with foreman

Is there anyway to stop my container from exiting when running my Rails server with foreman. When foreman does its thing and starts up my rails server and sidekiq it immediately exits with exit code 0 as expected. Is there any way to prevent this behaviour and keep the container running?

  • mongo addShard “No common protocol found” errmsg 126
  • Error making http request across linked Docker containers
  • How does docker Images and Layers work?
  • Obtain ID of just-built image
  • how do I start a simple container?
  • Are Dockerfiles stored on my machine?
  • Run Different Linux OS in Docker Container?
  • How to configure multiples ips for apps in docker
  • Is there a way to remove a name from a Docker container?
  • docker container changes not saving, osx
  • How to re-add a container in Bluemix
  • Can not start Docker 1.9.1
  • One Solution collect form web for “Docker with foreman”

    In my case it still running after after running Rails and Sidekiq:

    ➜  ~  ps aux | grep foreman
    maxd       2194   0.0  0.2  2486168  29004 s000  S+    2:09PM   0:00.56 foreman: master
    

    Seems like foreman starts in foreground always. May be you problem doesn’t related to foreman (try to check Rails and Sidekiq logs)? How are you running it in Docker container?

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