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?

  • INFO hdfs.HDFSEventSink: Writer callback called
  • Different servers generate different JWT tokens using the same parameters
  • Postgres sql file seems to not finish
  • How to startup up services on a Docker image?
  • Docker error from CMD command prompt: Something went wrong running an SSH Command
  • How does docker's `net=host` setting work, and how can I do something similar with e.g. VirtualBox?
  • How to get container id of running container programmatically (on Docker)?
  • Docker-Compose Issue with container name
  • How to load balance services in CoreOS?
  • Does restarting a Docker container “remember” initial run arguments?
  • libcontainer - system programmers perspective
  • Docker Volumes: Docker Volume does not get mounted correctly on Amazon Linux
  • 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.