<commit_before>FROM ubuntu:14.04.1

RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y wget curl vim
RUN apt-get install -y redis-tools git ruby
RUN gem install redis
RUN gem install sinatra
RUN gem install haml
RUN apt-get install -y make ruby-dev g++
RUN gem install aws-sdk thin
RUN gem install bundler rake
RUN gem install i18n
RUN git clone https://github.com/ohac/iceberg.git
RUN \
  mkdir -p /iceberg/public/css && \
  mkdir -p /iceberg/public/js && \
  mkdir -p /iceberg/public/fonts && \
  cd /iceberg/public/css && \
  curl -sO https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css && \
  curl -sO https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css && \
  cd /iceberg/public/js && \
  curl -sO https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js && \
  curl -sO https://cdnjs.cloudflare.com/ajax/libs/seedrandom/2.4.2/seedrandom.min.js && \
  cd /iceberg/public/fonts && \
  curl -sO https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/fonts/glyphicons-halflings-regular.woff && \
  curl -sO https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/fonts/glyphicons-halflings-regular.ttf
EXPOSE 4567
WORKDIR /iceberg
CMD bundle exec rackup -p 4567 -o 0.0.0.0

# Build:
# docker build -t ohac/iceberg .
#
# Run (standalone):
# docker run --name redis -d \
#   -v /somewhere/redis:/data redis redis-server --appendonly yes
# docker run --name iceberg -d --link redis:db -p 4567:4567 \
#   -v /somewhere/iceberg:/root/.iceberg ohac/iceberg
#
# Run (with nginx):
# (setup default.conf, cert.pem and cert.key)
# docker run --name bb -d -t -p 80:80 -p 443:443 busybox
# docker run --name rd -d --net container:bb \
#   -v $PWD/tmp/redis:/data redis redis-server --appendonly yes
# docker run --name nx -d --net container:bb \
#   -v $PWD/examples/docker/default.conf:/etc/nginx/conf.d/default.conf:ro \
#   -v $PWD/examples/docker/ssl:/data:ro nginx
# docker run --name ib -d --net container:bb \
#   -v $PWD/tmp/iceberg:/.iceberg -v $PWD/tmp/aws:/.aws:ro ohac/iceberg
<commit_msg>fix Dockerfile. add slim gem<commit_after>FROM ubuntu:14.04.1

RUN apt-get update && \
    apt-get upgrade -y && \
    apt-get install -y wget curl vim redis-tools git ruby make ruby-dev g++ && \
    apt-get clean
RUN gem install redis sinatra haml slim aws-sdk thin bundler rake i18n
RUN git clone https://github.com/ohac/iceberg.git
RUN \
  mkdir -p /iceberg/public/css && \
  mkdir -p /iceberg/public/js && \
  mkdir -p /iceberg/public/fonts && \
  cd /iceberg/public/css && \
  curl -sO https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css && \
  curl -sO https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css && \
  cd /iceberg/public/js && \
  curl -sO https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js && \
  curl -sO https://cdnjs.cloudflare.com/ajax/libs/seedrandom/2.4.2/seedrandom.min.js && \
  cd /iceberg/public/fonts && \
  curl -sO https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/fonts/glyphicons-halflings-regular.woff && \
  curl -sO https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/fonts/glyphicons-halflings-regular.ttf
EXPOSE 4567
WORKDIR /iceberg
CMD bundle exec rackup -p 4567 -o 0.0.0.0

# Build:
# docker build -t ohac/iceberg .
#
# Run (standalone):
# docker run --name redis -d \
#   -v /somewhere/redis:/data redis redis-server --appendonly yes
# docker run --name iceberg -d --link redis:db -p 4567:4567 \
#   -v /somewhere/iceberg:/root/.iceberg ohac/iceberg
#
# Run (with nginx):
# (setup default.conf, cert.pem and cert.key)
# docker run --name bb -d -t -p 80:80 -p 443:443 busybox
# docker run --name rd -d --net container:bb \
#   -v $PWD/tmp/redis:/data redis redis-server --appendonly yes
# docker run --name nx -d --net container:bb \
#   -v $PWD/examples/docker/default.conf:/etc/nginx/conf.d/default.conf:ro \
#   -v $PWD/examples/docker/ssl:/data:ro nginx
# docker run --name ib -d --net container:bb \
#   -v $PWD/tmp/iceberg:/.iceberg -v $PWD/tmp/aws:/.aws:ro ohac/iceberg

{'fraction_non_alphanumeric': 0.15973087465736358, 'fraction_numerical': 0.0274109145277847, 'mean_word_length': 2.927592954990215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3036332', 'n_tokens_mistral': 1663, 'n_tokens_neox': 1525, 'n_words': 366}