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?

  • Installing novadocker for openstack
  • Dockerfile inconsistent caching
  • How best to use docker in this situation
  • Error while setting up docker dev env
  • Determine if new docker container available on docker hub
  • failed to detect process id for “docker” - failed to find pid of “docker”: exit status 1
  • Starting Docker Container With Different Parameters
  • How to git install instead of pip install?
  • How to install nano on boot2docker
  • Docker compose “--no-build was passed”
  • Unrecognized argument format hosting.ini
  • Docker - Error response from daemon: client is newer than server
  • 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.