<commit_before>FROM ubuntu:14.04
MAINTAINER <NAME> "<EMAIL>"
ENV REFRESHED_AT 2016-02-10
LABEL version="1.0" role="git-it-scoreboard"

ADD scoreboard-start.sh /usr/bin/scoreboard-start.sh
RUN chmod +x /usr/bin/scoreboard-start.sh

# install software
RUN apt-get -qq update && \
apt-get upgrade -y && \
apt-get install -qqy build-essential tcl8.5 php5 git wget php5-json libapache2-mod-php5

# install redis
RUN cd /usr/local/src && \
wget http://download.redis.io/redis-stable.tar.gz && \
tar xvzf redis-stable.tar.gz && \
cd redis-stable && \
make && \
make install && \
sudo utils/install_server.sh < /dev/null
# sudo service redis_6379 start

# install composer
RUN cd /root/ && \
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php && \
php composer-setup.php --install-dir=/bin --filename=composer && \
php -r "unlink('composer-setup.php');"

# clone scoreboard source code
RUN cd /var/www && \
git clone https://github.com/taichunmin/git-it-course-scoreboard.git && \
cd /var/www/git-it-course-scoreboard && \
composer install

# modify apache setting
RUN sed -ri 's#DocumentRoot /var/www/html$#DocumentRoot /var/www/git-it-course-scoreboard/public#' /etc/apache2/sites-enabled/000-default.conf && \
sed -ri 's/^display_errors\s*=\s*Off/display_errors = On/g' /etc/php5/apache2/php.ini && \
sed -ri 's/^display_errors\s*=\s*Off/display_errors = On/g' /etc/php5/cli/php.ini && \
a2enmod rewrite

EXPOSE 80
CMD /usr/bin/client-start.sh<commit_msg>Fix scoreboard Dockerfile init script<commit_after>FROM ubuntu:14.04
MAINTAINER <NAME> "<EMAIL>"
ENV REFRESHED_AT 2016-02-10
LABEL version="1.0" role="git-it-scoreboard"

ADD scoreboard-start.sh /usr/bin/scoreboard-start.sh
RUN chmod +x /usr/bin/scoreboard-start.sh

# install software
RUN apt-get -qq update && \
apt-get upgrade -y && \
apt-get install -qqy build-essential tcl8.5 php5 git wget php5-json libapache2-mod-php5

# install redis
RUN cd /usr/local/src && \
wget http://download.redis.io/redis-stable.tar.gz && \
tar xvzf redis-stable.tar.gz && \
cd redis-stable && \
make && \
make install && \
sudo utils/install_server.sh < /dev/null
# sudo service redis_6379 start

# install composer
RUN cd /root/ && \
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php && \
php composer-setup.php --install-dir=/bin --filename=composer && \
php -r "unlink('composer-setup.php');"

# clone scoreboard source code
RUN cd /var/www && \
git clone https://github.com/taichunmin/git-it-course-scoreboard.git && \
cd /var/www/git-it-course-scoreboard && \
composer install

# modify apache setting
RUN sed -ri 's#DocumentRoot /var/www/html$#DocumentRoot /var/www/git-it-course-scoreboard/public#' /etc/apache2/sites-enabled/000-default.conf && \
sed -ri 's/^display_errors\s*=\s*Off/display_errors = On/g' /etc/php5/apache2/php.ini && \
sed -ri 's/^display_errors\s*=\s*Off/display_errors = On/g' /etc/php5/cli/php.ini && \
a2enmod rewrite

EXPOSE 80
CMD /usr/bin/scoreboard-start.sh
{'fraction_non_alphanumeric': 0.1644295302013423, 'fraction_numerical': 0.022818791946308724, 'mean_word_length': 3.739268680445151, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, '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': '1739828', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1109, 'n_words': 233}