Skip to content

Instantly share code, notes, and snippets.

@RobBikmansurov
Created November 1, 2019 05:26
Show Gist options
  • Save RobBikmansurov/943cc341ac4bed73558d59acd62b97a5 to your computer and use it in GitHub Desktop.
Save RobBikmansurov/943cc341ac4bed73558d59acd62b97a5 to your computer and use it in GitHub Desktop.
Dockerfie for Rails app
# Dockerfile
# /path/to/your/app/Dockerfile
# docker-compose up
FROM ruby:2.6.3-slim-stretch
RUN apt-get update && apt-get install -y \
curl \
build-essential \
freetds-dev freetds-bin \
libpq-dev &&\
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
apt-get update && apt-get install -y nodejs
RUN mkdir /app
WORKDIR /app
EXPOSE 3000
COPY Gemfile .
COPY Gemfile.lock .
RUN gem update bundler
RUN bundle install --jobs 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment