#!/bin/bash -e if [ -f tmp/pids/server.pid ]; then rm tmp/pids/server.pid fi rails server -b 0.0.0.0 # This will exec the CMD from your Dockerfile, i.e. "npm start" exec "$@"