Created
July 3, 2019 02:38
-
-
Save samacs/11563886ec4a3062dcc4512d40069999 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.6.3 AS builder | |
RUN apt-get update -qqy && \ | |
apt-get install -qqy --no-install-recommends \ | |
build-essential \ | |
unzip \ | |
xvfb \ | |
cmake \ | |
g++ \ | |
qt5-default \ | |
libqt5webkit5-dev \ | |
gstreamer1.0-plugins-base \ | |
gstreamer1.0-tools \ | |
gstreamer1.0-x \ | |
libpq-dev \ | |
curl \ | |
software-properties-common | |
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ | |
apt-get install -qqy nodejs && \ | |
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | \ | |
tee /etc/apt/sources.list.d/yarn.list && \ | |
apt-get update && apt-get install yarn | |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | \ | |
apt-key add - && \ | |
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > \ | |
/etc/apt/sources.list.d/google.list && \ | |
apt-get update -yqqq && \ | |
apt-get install -y google-chrome-stable > /dev/null 2>&1 && \ | |
sed -i 's/"$@"/--no-sandbox "$@"/g' /opt/google/chrome/google-chrome | |
RUN wget -O /tmp/chromedriver.zip \ | |
http://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip && \ | |
unzip /tmp/chromedriver.zip chromedriver -d /usr/bin/ && \ | |
rm /tmp/chromedriver.zip && \ | |
chmod ugo+rs /usr/bin/chromedriver | |
WORKDIR /bundler | |
ENV BUNDLE_PATH=/bundler \ | |
BUNDLE_BIN=${BUNDLE_PATH}/bin \ | |
GEM_HOME=${BUNDLE_PATH} | |
COPY ./billine/Gemfile ./billine/Gemfile.lock ./ | |
COPY ./billine/.ruby-version ./billine/.ruby-gemset ./ | |
RUN bundle install | |
FROM builder | |
WORKDIR /billine | |
ENV RAILS_ENV=development \ | |
BUNDLE_PATH=/bundler \ | |
BUNDLE_BIN=${BUNDLE_PATH}/bin \ | |
GEM_HOME=${BUNDLE_PATH} | |
ADD ./billine . | |
ENTRYPOINT ["/billine/docker-entrypoint.sh"] | |
EXPOSE 3000 | |
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment