Skip to content

Instantly share code, notes, and snippets.

@aried3r aried3r/Dockerfile

forked from koeckc/Dockerfile
Created Dec 10, 2017
What would you like to do?
Dockerfile ruby meeting
# Use the barebones version of Ruby 2.2.3.
FROM ruby:2.3.5-slim
# Optionally set a maintainer name to let people know who made this image.
# Install dependencies:
RUN apt-get update && apt-get install -qq -y build-essential git-core apt-transport-https --fix-missing --no-install-recommends
RUN apt-get install -qq -y ghostscript imagemagick libmagickcore-dev libmagickwand-dev postgresql-client libpq-dev libgsf-1-dev libmagic1 file curl --fix-missing --no-install-recommends
# Install libvips
RUN curl -LJO
RUN tar xvf vips-8.5.9.tar.gz
WORKDIR /root/vips-8.5.9
RUN ./configure
RUN make
RUN make install
RUN echo "/usr/local/lib/" >> /etc/
RUN apt-get install libvips -qq -y
RUN curl -sL | bash -
RUN curl -sS | apt-key add -
RUN echo "deb stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install nodejs yarn -qq -y
# Set an environment variable to store where the app is installed to inside
# of the Docker image.
ENV INSTALL_PATH /defectradar
# This sets the context of where commands will be ran in and is documented
# on Docker's website extensively.
ADD Gemfile.lock $INSTALL_PATH/
RUN rm -rf /root/vips-8.5.9
RUN RAILS_ENV=development gem install bundler && bundle install --jobs 20 --retry 5
# --- Add this to your Dockerfile ---
ENV RAILS_ENV development
COPY . ./
RUN yarn
RUN RAILS_ENV=development bundle exec spring binstub --all
#RUN chmod a+rwx -R project-dir/system
#RUN chmod a+rwx -R project-dir/system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.