<commit_before>FROM ruby:2.6-alpine as build

RUN apk add --no-cache \
  ruby \
  nodejs \
  postgresql-client \
  postgresql-dev \
  ca-certificates \
  ruby-dev \
  build-base \
  bash \
  linux-headers \
  zlib-dev \
  libxml2-dev \
  libxslt-dev \
  tzdata \
  && rm -rf /var/cache/apk/*

RUN mkdir -p /app /app/config
WORKDIR /app

RUN gem update --system 2.6.10

COPY . /app

ADD https://github.com/bundler/bundler-api/raw/master/versions.list /app/config/versions.list

RUN mv /app/config/database.yml.example /app/config/database.yml

RUN gem install bundler io-console --no-ri --no-rdoc && bundle install --jobs 20 --retry 5 --without deploy

RUN RAILS_ENV=production SECRET_KEY_BASE=1234 bin/rails assets:precompile




FROM ruby:2.6-alpine

RUN apk add --no-cache \
  ruby \
  nodejs \
  postgresql-client \
  ca-certificates \
  bash \
  tzdata \
  && rm -rf /var/cache/apk/*

RUN mkdir -p /app
WORKDIR /app

COPY --from=build /usr/local/bin/gem /usr/local/bin/gem
COPY --from=build /usr/local/bundle/ /usr/local/bundle/
COPY --from=build /app/ /app/

EXPOSE 3000

ENTRYPOINT ["bundle", "exec"]
CMD ["rails", "server", "-b", "0.0.0.0"]<commit_msg>Fix nokogiri error when running rake tasks inside docker (#2200)<commit_after>FROM ruby:2.6-alpine as build

RUN apk add --no-cache \
  ruby \
  nodejs \
  postgresql-client \
  postgresql-dev \
  ca-certificates \
  ruby-dev \
  build-base \
  bash \
  linux-headers \
  zlib-dev \
  libxml2-dev \
  libxslt-dev \
  tzdata \
  && rm -rf /var/cache/apk/*

RUN mkdir -p /app /app/config
WORKDIR /app

RUN gem update --system 2.6.10

COPY . /app

ADD https://github.com/bundler/bundler-api/raw/master/versions.list /app/config/versions.list

RUN mv /app/config/database.yml.example /app/config/database.yml

RUN gem install bundler io-console --no-ri --no-rdoc && bundle install --jobs 20 --retry 5 --without deploy

RUN RAILS_ENV=production SECRET_KEY_BASE=1234 bin/rails assets:precompile




FROM ruby:2.6-alpine

RUN apk add --no-cache \
  ruby \
  nodejs \
  postgresql-client \
  ca-certificates \
  bash \
  tzdata \
  xz-libs \
  && rm -rf /var/cache/apk/*

RUN mkdir -p /app
WORKDIR /app

COPY --from=build /usr/local/bin/gem /usr/local/bin/gem
COPY --from=build /usr/local/bundle/ /usr/local/bundle/
COPY --from=build /app/ /app/

EXPOSE 3000

ENTRYPOINT ["bundle", "exec"]
CMD ["rails", "server", "-b", "0.0.0.0"]
{'fraction_non_alphanumeric': 0.14741705165896682, 'fraction_numerical': 0.021839563208735827, 'mean_word_length': 2.5873493975903616, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6105745', 'n_tokens_mistral': 997, 'n_tokens_neox': 913, 'n_words': 225}