<commit_before># Riak
#
# VERSION       0.1.0

FROM ubuntu:precise
MAINTAINER <NAME> <EMAIL>

# Update the APT cache
RUN sed -i.bak 's/main$/main universe/' /etc/apt/sources.list
RUN apt-get update

# Install and setup project dependencies
RUN apt-get install -y lsb-release openssh-server

RUN mkdir -p /var/run/sshd

# Install Riak
ENV RIAK_VERSION 1.4.8
ENV RIAK_SHORT_VERSION 1.4
ADD http://s3.amazonaws.com/downloads.basho.com/riak/$RIAK_SHORT_VERSION/$RIAK_VERSION/ubuntu/precise/riak_$RIAK_VERSION-1_amd64.deb /
RUN (cd / && dpkg -i riak_$RIAK_VERSION-1_amd64.deb)
RUN rm /riak_$RIAK_VERSION-1_amd64.deb

# Update locale
RUN locale-gen en_US en_US.UTF-8

# Set root password
RUN echo 'root:basho' | chpasswd


# Install Riak and prepare it to run
RUN sed -i.bak 's/127.0.0.1/0.0.0.0/' /etc/riak/app.config
RUN sed -i.bak 's/{anti_entropy_concurrency, 2}/{anti_entropy_concurrency, 1}/' /etc/riak/app.config
RUN sed -i.bak 's/{map_js_vm_count, 8 }/{map_js_vm_count, 0 }/' /etc/riak/app.config
RUN sed -i.bak 's/{reduce_js_vm_count, 6 }/{reduce_js_vm_count, 0 }/' /etc/riak/app.config
RUN sed -i.bak 's/{hook_js_vm_count, 2 }/{hook_js_vm_count, 0 }/' /etc/riak/app.config
RUN sed -i.bak "s/##+zdbbl/+zdbbl/" /etc/riak/vm.args

# ulimits
RUN echo "ulimit -n 4096" >> /etc/default/riak

# sysctl
RUN echo "vm.swappiness = 0" > /etc/sysctl.d/riak.conf && \
    echo "net.ipv4.tcp_max_syn_backlog = 40000" >> /etc/sysctl.d/riak.conf && \
    echo "net.core.somaxconn = 40000" >> /etc/sysctl.d/riak.conf && \
    echo "net.ipv4.tcp_sack = 1" >> /etc/sysctl.d/riak.conf && \<commit_msg>Make Riak configuration changes a one-liner.<commit_after># Riak
#
# VERSION       0.1.0

FROM ubuntu:precise
MAINTAINER <NAME> <EMAIL>

# Update the APT cache
RUN sed -i.bak 's/main$/main universe/' /etc/apt/sources.list
RUN apt-get update

# Install and setup project dependencies
RUN apt-get install -y lsb-release openssh-server

RUN mkdir -p /var/run/sshd

# Install Riak
ENV RIAK_VERSION 1.4.8
ENV RIAK_SHORT_VERSION 1.4
ADD http://s3.amazonaws.com/downloads.basho.com/riak/$RIAK_SHORT_VERSION/$RIAK_VERSION/ubuntu/precise/riak_$RIAK_VERSION-1_amd64.deb /
RUN (cd / && dpkg -i riak_$RIAK_VERSION-1_amd64.deb)
RUN rm /riak_$RIAK_VERSION-1_amd64.deb

# Update locale
RUN locale-gen en_US en_US.UTF-8

# Set root password
RUN echo 'root:basho' | chpasswd

# Tune Riak configuration settings for the container
RUN sed -i.bak 's/127.0.0.1/0.0.0.0/' /etc/riak/app.config && \
    sed -i.bak 's/{anti_entropy_concurrency, 2}/{anti_entropy_concurrency, 1}/' /etc/riak/app.config && \
    sed -i.bak 's/{map_js_vm_count, 8 }/{map_js_vm_count, 0 }/' /etc/riak/app.config && \
    sed -i.bak 's/{reduce_js_vm_count, 6 }/{reduce_js_vm_count, 0 }/' /etc/riak/app.config && \
    sed -i.bak 's/{hook_js_vm_count, 2 }/{hook_js_vm_count, 0 }/' /etc/riak/app.config && \
    sed -i.bak "s/##+zdbbl/+zdbbl/" /etc/riak/vm.args

# ulimits
RUN echo "ulimit -n 4096" >> /etc/default/riak

# sysctl
RUN echo "vm.swappiness = 0" > /etc/sysctl.d/riak.conf && \
    echo "net.ipv4.tcp_max_syn_backlog = 40000" >> /etc/sysctl.d/riak.conf && \
    echo "net.core.somaxconn = 40000" >> /etc/sysctl.d/riak.conf && \
    echo "net.ipv4.tcp_sack = 1" >> /etc/sysctl.d/riak.conf && \
{'fraction_non_alphanumeric': 0.16013576056772602, 'fraction_numerical': 0.033940141931502625, 'mean_word_length': 3.4350205198358412, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6215734', 'n_tokens_mistral': 1493, 'n_tokens_neox': 1394, 'n_words': 282}