<commit_before>from    lopter/raring-base:latest
run     apt-get update
run     apt-get install --force-yes -y git-core python python-dev python-lxml python-imaging python-virtualenv python-psycopg2 build-essential postgresql postgresql-client sudo supervisor openssh-server
run     mkdir /srv/mediagoblin
add     ./env_setup.sh /srv/mediagoblin/env_setup.sh
run     bash -c "cd /srv/mediagoblin; chmod +x env_setup.sh; ./env_setup.sh"
add     ./email_logging.patch /srv/mediagoblin/email_logging.patch
run     bash -c "cd /srv/mediagoblin/mediagoblin; patch -p0 < ../email_logging.patch"
add     ./db_setup.sh /srv/mediagoblin/db_setup.sh
run     bash -c "cd /srv/mediagoblin; chmod +x db_setup.sh; ./db_setup.sh"
add     ./mediagoblin_local.ini /srv/mediagoblin/mediagoblin/mediagoblin_local.ini
add     ./db_update.sh /srv/mediagoblin/db_update.sh
run     bash -c "cd /srv/mediagoblin; chmod +x db_update.sh; cd mediagoblin; ../db_update.sh"
add     ./run_app.sh /srv/mediagoblin/run_app.sh
run     bash -c "cd /srv/mediagoblin; chmod +x run_app.sh"
run     echo "root:secret" | chpasswd
run     mkdir -p /var/run/sshd
run     mkdir -p /var/log/supervisor
run     locale-gen en_US en_US.UTF-8
add     ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
expose  22
expose  6543
cmd     ["/usr/bin/supervisord", "-n"]
<commit_msg>cleanup dockerfile<commit_after># Start off at Ubuntu 13.04
from    lopter/raring-base:latest
maintainer <NAME> <<EMAIL>>

# Install needed OS packages
run     apt-get update
run     apt-get install --force-yes -y git-core python python-dev python-lxml python-imaging python-virtualenv python-psycopg2 build-essential postgresql postgresql-client sudo supervisor openssh-server

# Make a home for mediagoblin
run     mkdir /srv/mediagoblin

# Setup the environment: clone the mediagoblin repo, install python packages
add     ./env_setup.sh /srv/mediagoblin/env_setup.sh
run     bash -c "cd /srv/mediagoblin; chmod +x env_setup.sh; ./env_setup.sh"

# Patch the email code so that test emails are logged
add     ./email_logging.patch /srv/mediagoblin/email_logging.patch
run     bash -c "cd /srv/mediagoblin/mediagoblin; patch -p0 < ../email_logging.patch"

# Set up the mediagoblin database in postgresql
add     ./db_setup.sh /srv/mediagoblin/db_setup.sh
run     bash -c "cd /srv/mediagoblin; chmod +x db_setup.sh; ./db_setup.sh"

# Configure the database connection and create the initial tables
add     ./mediagoblin_local.ini /srv/mediagoblin/mediagoblin/mediagoblin_local.ini
add     ./db_update.sh /srv/mediagoblin/db_update.sh
run     bash -c "cd /srv/mediagoblin; chmod +x db_update.sh; cd mediagoblin; ../db_update.sh"

# Insert the script to run mediagoblin
add     ./run_app.sh /srv/mediagoblin/run_app.sh
run     bash -c "cd /srv/mediagoblin; chmod +x run_app.sh"

# Set the root password
run     echo "root:secret" | chpasswd

# Create a couple of required directories
run     mkdir -p /var/run/sshd
run     mkdir -p /var/log/supervisor
run     locale-gen en_US en_US.UTF-8

# Configure supervisord
add     ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf

# Expose the ports and set the command to run
expose  22
expose  6543
cmd     ["/usr/bin/supervisord", "-n"]

{'fraction_non_alphanumeric': 0.10567090176634646, 'fraction_numerical': 0.006817477533312674, 'mean_word_length': 3.2925531914893615, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, 'https://': 0, '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': '943819', 'n_tokens_mistral': 1228, 'n_tokens_neox': 1181, 'n_words': 312}