Skip to content

Instantly share code, notes, and snippets.

@mustela
Created June 26, 2015 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustela/c78477f12896b40c2829 to your computer and use it in GitHub Desktop.
Save mustela/c78477f12896b40c2829 to your computer and use it in GitHub Desktop.
Rails Dockerfile
# Base image
FROM ruby:latest
ENV HOME /home/rails/webapp
# Install PGsql dependencies and js engine
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
WORKDIR $HOME
# Install gems
ADD Gemfile* $HOME/
RUN bundle install
# Add the app code
ADD . $HOME
# Default command
CMD ["rails", "server", "--binding", "0.0.0.0"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment