FROM ruby:2.6.3-alpine MAINTAINER Timeboard ############### INSTALL RUBY ON RAILS ESSENTIALS ############### RUN apk add --update tzdata && \ rm -rf /var/cache/apk/* # Install bundler and foreman gems RUN gem install bundler; gem install foreman; # Generating entrypoint file RUN echo -e '#!/bin/sh\n\ \n\ cd /code\n\ test -f ./tmp/pids/server.pid && rf ./tmp/pids/server.pid; true\n\ \n\ echo "---------------------------------------------------------------"\n\ echo "-----> Performing bundle install"\n\ bundle install\n\ echo "-----> Compiling Assets"\n\ bundle exec rails assets:precompile\n\ \n\ exec "$@"' >> /entrypoint; chmod +x /entrypoint; # Set entrypoint ENTRYPOINT ["/entrypoint"] # Command to execute at container start CMD foreman start -f Procfile