forked from RefugeRestrooms/refugerestrooms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-organize, add explanatory comments, and delete unnecessary package installations.
- Loading branch information
Showing
1 changed file
with
14 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
FROM ruby:2.3.7 | ||
ENV PHANTOM_JS=2.1.1 | ||
|
||
# Add the apt repository for yarn | ||
RUN curl -sS http://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | ||
echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | ||
# Add the apt-repository for the latest node.js and install node.js | ||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ | ||
apt-get install -y nodejs | ||
|
||
# Add the apt-repository for the latest node.js | ||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - | ||
# Add the apt repository for yarn and install yarn | ||
RUN curl -sS http://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | ||
echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ | ||
apt-get update && apt-get install -y yarn | ||
|
||
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | ||
RUN apt-get install build-essential chrpath libssl-dev libxft-dev -y && \ | ||
apt-get install libfreetype6 libfreetype6-dev -y && \ | ||
apt-get install libfontconfig1 libfontconfig1-dev -y && \ | ||
cd ~ && \ | ||
# Install PhantomJS | ||
RUN cd ~ && \ | ||
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" && \ | ||
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2 && \ | ||
tar xvjf $PHANTOM_JS.tar.bz2 && \ | ||
mv $PHANTOM_JS /usr/local/share && \ | ||
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin && \ | ||
apt-get install -y yarn | ||
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin | ||
|
||
# Establish working directory in Docker container's /refugerestrooms folder | ||
RUN mkdir /refugerestrooms | ||
WORKDIR /refugerestrooms | ||
|
||
# Install Gems | ||
COPY Gemfile /refugerestrooms/Gemfile | ||
COPY Gemfile.lock /refugerestrooms/Gemfile.lock | ||
RUN bundle install | ||
|
||
# Install Node.js packages | ||
COPY package.json yarn.lock /refugerestrooms/ | ||
RUN yarn --pure-lockfile |