Reno, NV    +1 (800)0 621-0871

Go back

Development

Learning Docker: Daemonizing a start script

  |  May 28, 2014

While I was able to get a generic Rails process to boot up inside a container, I wanted to do this using runit so that I could have more than one process running inside the container.

The base image I’m using has runit installed and also provides a custom init script.

My steps included:

  • putting the relevant Docker RUN steps inside a shell script
  • symlinking these scripts inside runit’s services directory
  • replacing the CMD with a call to the custom init script

See how I did it here.