Last active
February 2, 2017 00:58
-
-
Save olkeene/9aa2b51302e1bfd962a8bb8f499c315e to your computer and use it in GitHub Desktop.
Revisions
-
olkeene revised this gist
Feb 2, 2017 . 1 changed file with 44 additions and 28 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,49 +1,65 @@ FROM ruby:2.1-slim RUN apt-get update -qq && \ apt-get install -y \ build-essential git \ libmysqlclient-dev mysql-client libxslt-dev libxml2-dev \ curl net-tools --no-install-recommends ENV NVM_DIR "/root/.nvm" ENV NVM_VERSION 0.33.0 ENV NODE_VERSION 7.5.0 RUN curl https://raw.githubusercontent.com/creationix/nvm/v${NVM_VERSION}/install.sh | bash \ && . $NVM_DIR/nvm.sh \ && nvm install $NODE_VERSION \ && nvm alias default $NODE_VERSION \ && nvm use default ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH WORKDIR /tmp RUN curl -o sphinx.tar.gz http://sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz \ && tar -zxvf sphinx.tar.gz > /dev/null \ && curl -o libstemmer_c.tgz http://snowball.tartarus.org/dist/libstemmer_c.tgz \ && tar -xvzf libstemmer_c.tgz > /dev/null \ && cd sphinx-*/ \ && cp -R ../libstemmer_c/* ./libstemmer_c \ && ./configure --with-mysql --with-libstemmer > /dev/null \ && make > /dev/null && make install > /dev/null # Cleanup RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ENV APP /app ENV BUNDLE_PATH /bundle VOLUME /bundle # Gems RUN gem install bundler ADD Gemfile . ADD Gemfile.lock . ADD vendor . RUN bundle install --jobs 4 --retry 5 ADD package.json . # If npm was invoked with root privileges, # then it will change the uid to the user account or uid specified by the user config, # which defaults to nobody. # Set the unsafe-perm flag to run scripts with root privileges. # https://docs.npmjs.com/misc/scripts#user RUN npm install --unsafe-perm # App RUN mkdir $APP WORKDIR $APP ADD . $APP EXPOSE 3000 ENTRYPOINT bin/docker-entrypoint.sh $0 $@ -
olkeene revised this gist
Jan 17, 2017 . 1 changed file with 16 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,28 @@ FROM ruby:2.1-slim RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - RUN apt-get update -qq && \ apt-get install -y \ build-essential git \ libmysqlclient-dev mysql-client libxslt-dev libxml2-dev \ curl net-tools libgeos-dev \ wkhtmltopdf \ nodejs \ --no-install-recommends && \ apt-get clean RUN curl -o sphinx.tar.gz http://sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz && \ tar -zxvf sphinx.tar.gz && \ curl -o libstemmer_c.tgz http://snowball.tartarus.org/dist/libstemmer_c.tgz && \ tar -xvzf libstemmer_c.tgz && \ cd sphinx-*/ && \ cp -R ../libstemmer_c/* ./libstemmer_c && \ ./configure --with-mysql --with-libstemmer && \ make && make install ENV APP /app ENV BUNDLE_PATH /bundle @@ -25,17 +35,6 @@ ADD Gemfile.lock Gemfile.lock ADD vendor vendor RUN bundle install # App RUN mkdir $APP WORKDIR $APP -
olkeene created this gist
Jan 17, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,50 @@ FROM ruby:2.1-slim RUN apt-get update -qq && \ apt-get install -y \ build-essential git \ libmysqlclient-dev mysql-client libxslt-dev libxml2-dev \ curl net-tools libgeos-dev --no-install-recommends && \ apt-get clean RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - RUN apt-get update -qq && \ apt-get install -y \ wkhtmltopdf \ nodejs --no-install-recommends ENV APP /app ENV BUNDLE_PATH /bundle # Gems RUN gem install bundler WORKDIR /tmp ADD Gemfile Gemfile ADD Gemfile.lock Gemfile.lock ADD vendor vendor RUN bundle install RUN curl -o sphinx.tar.gz http://sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz && \ tar -zxvf sphinx.tar.gz && \ curl -o libstemmer_c.tgz http://snowball.tartarus.org/dist/libstemmer_c.tgz && \ tar -xvzf libstemmer_c.tgz && \ cd sphinx-*/ && \ cp -R ../libstemmer_c/* ./libstemmer_c && \ ./configure --with-mysql --with-libstemmer && \ make && make install # App RUN mkdir $APP WORKDIR $APP ADD . $APP # Not compatible with your operating system or architecture: [email protected] # https://github.com/npm/npm/issues/13880 RUN npm install --no-optional EXPOSE 3000 ENTRYPOINT bin/docker-entrypoint.sh $0 $@