<commit_before># How to use it
# =============
#
# Visit http://blog.zedroot.org/using-docker-to-maintain-a-ruby-gem/

# ~~~~ Image base ~~~~
# Base image with the latest Ruby only
FROM ruby:2.3.0-slim
MAINTAINER <NAME> <EMAIL>


# ~~~~ Set up the environment ~~~~
ENV DEBIAN_FRONTEND noninteractive

# ~~~~ OS Maintenance ~~~~
RUN apt-get update && apt-get install -y unzip

# ~~~~ Rails Preparation ~~~~
# Rubygems and Bundler
RUN touch ~/.gemrc && \
  echo "gem: --no-ri --no-rdoc" >> ~/.gemrc && \
  gem install rubygems-update && \
  update_rubygems && \
  gem install bundler && \
  mkdir -p /gem/

WORKDIR /gem/
ADD . /gem/
RUN bundle install

# Import the gem source code
VOLUME .:/gem/

ENTRYPOINT ["bundle", "exec"]
CMD ["rake", "-T"]
<commit_msg>Update Dockerfile<commit_after># How to use it
# =============
#
# Visit http://blog.zedroot.org/using-docker-to-maintain-a-ruby-gem/

# ~~~~ Image base ~~~~
# Base image with the latest Ruby only
FROM ruby:2.3.0-slim
MAINTAINER <NAME> <EMAIL>


# ~~~~ Set up the environment ~~~~
ENV DEBIAN_FRONTEND noninteractive

RUN mkdir -p /gem/
WORKDIR /gem/
ADD . /gem/

# ~~~~ OS Maintenance & Rails Preparation ~~~~
# Rubygems and Bundler
RUN apt-get update && \
  apt-get install -y git build-essential && \
  touch ~/.gemrc && \
  echo "gem: --no-ri --no-rdoc" >> ~/.gemrc && \
  gem install rubygems-update && \
  update_rubygems && \
  gem install bundler && \
  bundle install && \
  apt-get remove --purge -y build-essential && \
  apt-get autoclean -y && \
  apt-get clean

# Import the gem source code
VOLUME .:/gem/

ENTRYPOINT ["bundle", "exec"]
CMD ["rake", "-T"]

{'fraction_non_alphanumeric': 0.18696186961869618, 'fraction_numerical': 0.0036900369003690036, 'mean_word_length': 3.1294416243654823, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '588394', 'n_tokens_mistral': 609, 'n_tokens_neox': 582, 'n_words': 171}