<commit_before>FROM ubuntu:14.04.2
MAINTAINER <NAME>

# Make the machine up to date and install some dependencies
RUN apt-get install -y software-properties-common python && \
    add-apt-repository ppa:chris-lea/node.js && \
    apt-get remove -y software-properties-common python && \
    apt-get autoremove -y && \
    apt-get clean
RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list
RUN apt-get update && \
    apt-get install -y imagemagick build-essential sqlite3 make gcc nodejs && \
    apt-get autoremove -y && \
    apt-get clean

# Export the database, originals dir and the config dir
RUN mkdir /opt/live-image-resize
RUN mkdir /opt/live-image-resize/config
RUN mkdir /opt/images
RUN mkdir /opt/db
RUN chmod 0777 /opt/db
VOLUME ["/opt/db", "/opt/images", "/opt/live-image-resize/config"]
EXPOSE 1337

# Add the dependencies
ADD package.json /opt/live-image-resize/package.json
RUN cd /opt/live-image-resize && npm install

# Add the application
ADD resize.js /opt/live-image-resize/resize.js

# Run the entire thing!
WORKDIR /opt/live-image-resize
CMD ["/usr/bin/node", "resize.js"]
<commit_msg>Improved Dockerfile<commit_after>FROM node:latest
MAINTAINER <NAME>

RUN apt-get update && \
    apt-get install -y imagemagick sqlite3 && \
    apt-get autoremove -y && \
    apt-get clean

RUN npm install -g pm2

# Export the database, originals dir and the config dir
RUN mkdir /opt/live-image-resize
RUN mkdir /opt/live-image-resize/config
RUN mkdir /opt/images
RUN mkdir /opt/db
RUN chmod 0777 /opt/db
VOLUME ["/opt/db", "/opt/images", "/opt/live-image-resize/config"]
EXPOSE 1337

# Add the dependencies
ADD package.json /opt/live-image-resize/package.json
RUN cd /opt/live-image-resize && npm install

# Add the application
ADD resize.js /opt/live-image-resize/resize.js

# Run the entire thing!
WORKDIR /opt/live-image-resize
CMD ["/usr/local/bin/pm2", "start", "resize.js", "--no-daemon", "--instances=0"]

{'fraction_non_alphanumeric': 0.13129770992366413, 'fraction_numerical': 0.013231552162849873, 'mean_word_length': 3.478359908883827, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5901932', 'n_tokens_mistral': 698, 'n_tokens_neox': 661, 'n_words': 196}