Skip to content

Instantly share code, notes, and snippets.

@rafaelqueiroz88
Created September 21, 2021 23:21
Show Gist options
  • Save rafaelqueiroz88/256db08b9a13b5ef6886baec5bb11236 to your computer and use it in GitHub Desktop.
Save rafaelqueiroz88/256db08b9a13b5ef6886baec5bb11236 to your computer and use it in GitHub Desktop.
Dockerfile for Ruby on Rails apps
FROM ruby:3.0.2
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt update
RUN apt install yarn -y
RUN apt install nano -y
RUN apt install nodejs -y
RUN apt install build-essential libpq-dev -y
RUN apt install postgresql-client -y
RUN apt install redis -y
RUN gem install rails
RUN gem install bundler
RUN gem install pg
RUN gem install sidekiq
RUN gem install redis
RUN gem install firebase
RUN mkdir /app
WORKDIR /app
COPY app-entrypoint.sh /usr/src/app/app-entrypoint.sh
RUN chmod +x /usr/src/app/app-entrypoint.sh
ENV RAILS_ENV development
ENV RACK_ENV development
EXPOSE 3000
ENTRYPOINT [ "/usr/src/app/app-entrypoint.sh" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment