<commit_before># Container for running Sibyl's Node.js server

FROM node:alpine

# Install system packages
RUN apk add --no-cache bash curl docker jq

# Install dat
# A `global` install fails (permissions error) so we install in `/bin` and
# create a symlink
RUN cd /bin \
 && apk add --no-cache --virtual build-dependencies python g++ make \
 && npm install dat \
 && apk del build-dependencies \
 && ln -s /bin/node_modules/.bin/dat dat

# Install kubctrl
RUN curl -L -o /bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl \
 && chmod +x /bin/kubectl

RUN mkdir /usr/app 
WORKDIR /usr/app

# Just copy files needed for `npm install` so that it
# is not re-run when an unrelated file (e.g. `sibyl.sh`)
# is changed
COPY package.json .
RUN npm install && npm run build

# Now copy over everything
COPY . .

EXPOSE 3000
CMD ["npm", "start"]<commit_msg>Use a larger base image (jessie based) that supports dat<commit_after># Container for running Sibyl's Node.js server

FROM node:6
ENV NPM_CONFIG_LOGLEVEL warn

# Install docker
RUN apt-get update \
 && apt-get install -y \
   init-system-helpers iptables libapparmor1
RUN curl -o docker.deb https://download.docker.com/linux/debian/dists/jessie/pool/stable/amd64/docker-ce_17.03.0~ce-0~debian-jessie_amd64.deb \
 && dpkg -i docker.deb \
 && rm docker.deb

# Install kubctrl
RUN curl -L -o /bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl \
 && chmod +x /bin/kubectl

# Install dat
RUN npm install dat --global

RUN mkdir /usr/app 
WORKDIR /usr/app

# Just copy files needed for `npm install` so that it
# is not re-run when an unrelated file (e.g. `sibyl.sh`)
# is changed
COPY package.json .
RUN npm install

# Now copy over everything and do build
COPY . .
RUN npm run build

# Expose server.js port
EXPOSE 3000
# Expose dat port
EXPOSE 3282

CMD ["npm", "start"]
{'fraction_non_alphanumeric': 0.11360083376758728, 'fraction_numerical': 0.01771756122980719, 'mean_word_length': 3.485981308411215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6620961', 'n_tokens_mistral': 718, 'n_tokens_neox': 662, 'n_words': 228}