<commit_before>FROM node:7-alpine

WORKDIR /tmp/iidy

COPY . .

RUN npm install . \
  && npm run build \
  && $(npm bin)/pkg --out-path dist -t node7-alpine-x64 package.json

FROM alpine:3.6

RUN apk --no-cache add libstdc++

COPY --from=0 /tmp/iidy/dist/iidy /iidy

ENTRYPOINT ["/iidy"]
<commit_msg>update Dockerfile to strip the binary and shave 8Mb + bump to node8<commit_after>FROM node:8-alpine

WORKDIR /tmp/iidy

COPY . .

# TODO use PKG_CACHE_PATH to cache the pkg downloads

RUN apk update && apk add --no-cache binutils \
  && yarn \
  && $(npm bin)/pkg --out-path dist -t node8-alpine-x64 package.json \
  && strip /root/.pkg-cache/*/fetched-v8* \
  && $(npm bin)/pkg --out-path dist -t node8-alpine-x64 package.json
# We run pkg twice. First to grab the base binary then again after we strip it.
# This strips 8Mb off the total image size.

FROM alpine:3.6

RUN apk --no-cache add libstdc++

COPY --from=0 /tmp/iidy/dist/iidy /iidy

ENTRYPOINT ["/iidy"]

{'fraction_non_alphanumeric': 0.13561076604554864, 'fraction_numerical': 0.021739130434782608, 'mean_word_length': 2.9631147540983607, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '849754', 'n_tokens_mistral': 393, 'n_tokens_neox': 362, 'n_words': 116}