<commit_before>FROM jclement/baseimage
MAINTAINER <EMAIL>
EXPOSE 80 22

ENV HOME /root

# install necessary packages
RUN apt-get update
RUN apt-get install -y make nodejs nodejs-legacy nginx git-core ruby rake imagemagick python ruby-dev
RUN gem install jekyll execjs inflection kramdown mini_magick pygments.rb redcarpet titleize 

# setup SSH
COPY authorized_keys /root/.ssh/authorized_keys

# copy nginx configuration file (port 80)
COPY nginx.default /etc/nginx/sites-enabled/default
RUN echo "daemon off;" >> /etc/nginx/nginx.conf

# enable nginx service
RUN mkdir -p /etc/service/nginx
RUN echo "#!/bin/sh\nexec /usr/sbin/nginx" > /etc/service/nginx/run
RUN chmod a+x /etc/service/nginx/run

# pull latest website source to /src owned by site-owner
RUN mkdir -p /src
RUN useradd -ms /bin/bash site-owner
RUN chown site-owner.site-owner /src
USER site-owner
RUN cd /src && git clone https://github.com/ctrowat/jekyll.git 
RUN cd /src/site && /usr/local/bin/jekyll build
USER root

# setup website refresh crontab 
RUN echo "*/20 * * * * cd /src/site && git pull && /usr/local/bin/jekyll build" > /tmp/crontab
RUN crontab -u site-owner /tmp/crontab
RUN rm /tmp/crontab

CMD ["/sbin/my_init"]
<commit_msg>Fixing dockerfile<commit_after>FROM jclement/baseimage
MAINTAINER <EMAIL>
EXPOSE 80 22

ENV HOME /root

# install necessary packages
RUN apt-get update
RUN apt-get install -y make nodejs nodejs-legacy nginx git-core ruby rake imagemagick python ruby-dev
RUN gem install jekyll execjs inflection kramdown mini_magick pygments.rb redcarpet titleize 

# setup SSH
COPY authorized_keys /root/.ssh/authorized_keys

# copy nginx configuration file (port 80)
COPY nginx.default /etc/nginx/sites-enabled/default
RUN echo "daemon off;" >> /etc/nginx/nginx.conf

# enable nginx service
RUN mkdir -p /etc/service/nginx
RUN echo "#!/bin/sh\nexec /usr/sbin/nginx" > /etc/service/nginx/run
RUN chmod a+x /etc/service/nginx/run

# pull latest website source to /src owned by site-owner
RUN mkdir -p /src
RUN useradd -ms /bin/bash site-owner
RUN chown site-owner.site-owner /src
USER site-owner
RUN cd /src && git clone https://github.com/ctrowat/jekyll.git site
RUN cd /src/site && /usr/local/bin/jekyll build
USER root

# setup website refresh crontab 
RUN echo "*/20 * * * * cd /src/site && git pull && /usr/local/bin/jekyll build" > /tmp/crontab
RUN crontab -u site-owner /tmp/crontab
RUN rm /tmp/crontab

CMD ["/sbin/my_init"]

{'fraction_non_alphanumeric': 0.10643564356435643, 'fraction_numerical': 0.006600660066006601, 'mean_word_length': 3.85, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '3765672', 'n_tokens_mistral': 895, 'n_tokens_neox': 843, 'n_words': 276}