Skip to content

Instantly share code, notes, and snippets.

@knu
Created June 24, 2018 13:17
Show Gist options
  • Save knu/2650e7d924e818ad4441dc06017162d1 to your computer and use it in GitHub Desktop.
Save knu/2650e7d924e818ad4441dc06017162d1 to your computer and use it in GitHub Desktop.
FROM gcr.io/google-appengine/ruby:latest
ARG REQUESTED_RUBY_VERSION="2.5.1"
RUN if test -n "$REQUESTED_RUBY_VERSION" -a \
! -x /rbenv/versions/$REQUESTED_RUBY_VERSION/bin/ruby; then \
(apt-get update -y \
&& apt-get install -y -q gcp-ruby-$REQUESTED_RUBY_VERSION) \
|| (cd /rbenv/plugins/ruby-build \
&& git pull \
&& RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install -s $REQUESTED_RUBY_VERSION) \
&& rbenv global $REQUESTED_RUBY_VERSION \
&& gem install -q --no-rdoc --no-ri bundler --version $BUNDLER_VERSION \
&& apt-get clean \
&& rm -f /var/lib/apt/lists/*_*; \
fi
ENV RBENV_VERSION=${REQUESTED_RUBY_VERSION:-$RBENV_VERSION}
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=1
COPY . /app/
RUN date; \
if test -f Gemfile.lock; then \
case "$RAILS_ENV" in \
(production) \
bundle install --without="development test" ;; \
(*) \
bundle install -- ;; \
esac \
&& rbenv rehash; \
fi
source 'https://rubygems.org'
gem 'nokogiri', '1.8.3'
GEM
remote: https://rubygems.org/
specs:
mini_portile2 (2.3.0)
nokogiri (1.8.3)
mini_portile2 (~> 2.3.0)
PLATFORMS
ruby
DEPENDENCIES
nokogiri (= 1.8.3)
BUNDLED WITH
1.16.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment