github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/images/benchmarks/ruby/Dockerfile (about)

     1  # example based on https://github.com/errm/fib
     2  FROM alpine:3.9 as build
     3  
     4  COPY Gemfile Gemfile.lock ./
     5  
     6  RUN apk add --no-cache ruby ruby-dev ruby-bundler ruby-json build-base bash \
     7          && bundle install --frozen -j4 -r3 --no-cache --without development \
     8          && apk del --no-cache ruby-bundler \
     9          && rm -rf /usr/lib/ruby/gems/*/cache
    10  
    11  FROM alpine:3.9 as prod
    12  
    13  COPY --from=build /usr/lib/ruby/gems /usr/lib/ruby/gems
    14  RUN apk add --no-cache ruby ruby-json ruby-etc redis apache2-utils \
    15          && ruby -e "Gem::Specification.map.each do |spec| \
    16        Gem::Installer.for_spec( \
    17          spec, \
    18          wrappers: true, \
    19          force: true, \
    20          install_dir: spec.base_dir, \
    21          build_args: spec.build_args, \
    22        ).generate_bin \
    23      end"
    24  
    25  COPY . /app/.
    26  
    27  STOPSIGNAL SIGINT