<commit_before>FROM ubuntu:trusty
MAINTAINER "<NAME>" <<EMAIL>>

RUN apt-get update
RUN apt-get dist-upgrade -y


RUN apt-get install -y ruby

# Optimization, will be asserted by puppet
RUN apt-get install -y apache2 reprepro

# Prerequisites implicitly installed, but explicit allows docker caching
RUN apt-get install -y git wget openjdk-7-jdk ca-certificates
RUN apt-get install -y openssh-server apparmor python-yaml daemon python-configparser

RUN gem install puppet --no-rdoc --no-ri
RUN puppet module install rtyler/jenkins
RUN puppet module install puppetlabs-apache
RUN puppet module install puppetlabs-vcsrepo
RUN puppet module install puppetlabs-ntp

ADD hiera.yaml /etc/puppet/hiera.yaml
RUN mkdir -p /etc/puppet/hieradata
ADD common.yaml /etc/puppet/hieradata/common.yaml
ADD manifests /tmp/manifests
ADD repo_files /tmp/jenkins/repo_files
RUN puppet apply -v /tmp/manifests/site.pp --modulepath=/etc/puppet/modules:/usr/share/puppet/modules:/tmp/jenkins

WORKDIR /tmp
USER jenkins-slave
WORKDIR /home/jenkins-slave/reprepro-updater
ENV PYTHONPATH /home/jenkins-slave/reprepro-updater/src:$PYTHONPATH
# Setup reprepro repos
RUN python ./scripts/setup_repo.py ubuntu_building -c
RUN python ./scripts/setup_repo.py ubuntu_testing -c
RUN python ./scripts/setup_repo.py ubuntu_main -c

RUN python ./scripts/import_upstream.py ubuntu_building ./config/bootstrap.yaml -c
RUN python ./scripts/import_upstream.py ubuntu_testing ./config/bootstrap.yaml -c
RUN python ./scripts/import_upstream.py ubuntu_main ./config/bootstrap.yaml -c

USER root
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

VOLUME /var/lib/docker

CMD bash -c 'service ntp start && service ssh start && service apache2 start && /etc/init.d/jenkins-slave start && while true; do sleep 1; done'<commit_msg>remove boostrap from image. It must be run on the repo as a job before starting the system<commit_after>FROM ubuntu:trusty
MAINTAINER "<NAME>" <<EMAIL>>

RUN apt-get update
RUN apt-get dist-upgrade -y


RUN apt-get install -y ruby

# Optimization, will be asserted by puppet
RUN apt-get install -y apache2 reprepro

# Prerequisites implicitly installed, but explicit allows docker caching
RUN apt-get install -y git wget openjdk-7-jdk ca-certificates
RUN apt-get install -y openssh-server apparmor python-yaml daemon python-configparser

RUN gem install puppet --no-rdoc --no-ri
RUN puppet module install rtyler/jenkins
RUN puppet module install puppetlabs-apache
RUN puppet module install puppetlabs-vcsrepo
RUN puppet module install puppetlabs-ntp

ADD hiera.yaml /etc/puppet/hiera.yaml
RUN mkdir -p /etc/puppet/hieradata
ADD common.yaml /etc/puppet/hieradata/common.yaml
ADD manifests /tmp/manifests
ADD repo_files /tmp/jenkins/repo_files
RUN puppet apply -v /tmp/manifests/site.pp --modulepath=/etc/puppet/modules:/usr/share/puppet/modules:/tmp/jenkins

WORKDIR /tmp
USER jenkins-slave
WORKDIR /home/jenkins-slave/reprepro-updater
ENV PYTHONPATH /home/jenkins-slave/reprepro-updater/src:$PYTHONPATH
# Setup reprepro repos
RUN python ./scripts/setup_repo.py ubuntu_building -c
RUN python ./scripts/setup_repo.py ubuntu_testing -c
RUN python ./scripts/setup_repo.py ubuntu_main -c

USER root
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

VOLUME /var/lib/docker

CMD bash -c 'service ntp start && service ssh start && service apache2 start && /etc/init.d/jenkins-slave start && while true; do sleep 1; done'
{'fraction_non_alphanumeric': 0.09236725663716815, 'fraction_numerical': 0.0022123893805309734, 'mean_word_length': 4.455505279034691, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1823629', 'n_tokens_mistral': 1264, 'n_tokens_neox': 1173, 'n_words': 374}