<commit_before>FROM ruby:2.1

ENV DEBIAN_FRONTEND noninteractive

RUN curl -sL https://deb.nodesource.com/setup | bash -
RUN  apt-get update -qq \
  && apt-get install -qqy \
       locales \
       nodejs \
       postgresql-client \
       libxmlsec1-dev \
  && rm -rf /var/lib/apt/lists/*

# Ensure UTF-8 locale
RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen
RUN locale-gen en_US.UTF-8
ENV LANG       en_US.UTF-8
ENV LC_ALL     en_US.UTF-8
RUN dpkg-reconfigure locales

# Canvas requires bundler 1.7.10
RUN gem uninstall bundler \
  && gem install bundler -v 1.7.10

RUN mkdir /app
WORKDIR /app
RUN bundle config path /app/vendor/bundle/docker
RUN bundle config bin /usr/local/bin
ENV RAILS_ENV development<commit_msg>switch dev Dockerfile to run as docker user<commit_after>FROM ruby:2.1

ENV DEBIAN_FRONTEND noninteractive

RUN curl -sL https://deb.nodesource.com/setup | bash -
RUN  apt-get update -qq \
  && apt-get install -qqy \
       locales \
       nodejs \
       postgresql-client \
       libxmlsec1-dev \
  && rm -rf /var/lib/apt/lists/*

# Ensure UTF-8 locale
RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen
RUN locale-gen en_US.UTF-8
ENV LANG       en_US.UTF-8
ENV LC_ALL     en_US.UTF-8
RUN dpkg-reconfigure locales

# Canvas requires bundler 1.7.10
RUN gem uninstall bundler \
  && gem install bundler -v 1.7.10

RUN mkdir /app
WORKDIR /app

RUN mkdir /home/docker \
 && useradd -d /home/docker docker \
 && chown -R docker:docker /home/docker /usr/local/bundle

ENV PATH /usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
USER docker

RUN bundle config path /app/vendor/bundle/docker/$(ruby -e 'print RUBY_VERSION')/
RUN bundle config bin /usr/local/bundle/bin
ENV RAILS_ENV development
{'fraction_non_alphanumeric': 0.11226252158894647, 'fraction_numerical': 0.01957397812320092, 'mean_word_length': 2.7782608695652176, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3678953', 'n_tokens_mistral': 674, 'n_tokens_neox': 635, 'n_words': 176}