Skip to content

Instantly share code, notes, and snippets.

@oliveira-andre
Last active June 4, 2018 02:53
Show Gist options
  • Select an option

  • Save oliveira-andre/0fcfa5658e3e2ad1c1ab69453e41543f to your computer and use it in GitHub Desktop.

Select an option

Save oliveira-andre/0fcfa5658e3e2ad1c1ab69453e41543f to your computer and use it in GitHub Desktop.
dockerfile to rails
FROM ruby:latest
RUN mkdir -p /app
WORKDIR /app
RUN apt-get update && apt-get install -y nodejs --no-install-recommends && rm -rf /var/lib/apt/lists/*
RUN gem install rails -v 5.2.0
COPY Gemfile /app
COPY . /app
ENV RAILS_ENV production
ENV RAILS_SERVE_STATIC_FILES true
ENV RAILS_LOG_TO_STDOUT true
RUN bundle install
RUN rails assets:precompile
EXPOSE 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment