<commit_before># Freebind build
FROM node:12-slim as freebind

RUN apt-get update \
 && apt-get install -y git build-essential

RUN git clone https://github.com/matrix-org/freebindfree.git
RUN cd freebindfree && make

# Typescript build
FROM node:12-slim as builder

WORKDIR /build

RUN apt-get update && apt-get install -y git python3 libicu-dev build-essential

COPY ./package.json /build/package.json
COPY ./package-lock.json /build/package-lock.json
COPY ./src /build/src
COPY ./tsconfig.json /build/tsconfig.json
COPY ./types /build/types

RUN npm ci
RUN npm run build

# App
FROM node:12-slim

RUN apt-get update && apt-get install -y sipcalc iproute2 openssl --no-install-recommends
RUN rm -rf /var/lib/apt/lists/*
RUN mkdir app<commit_msg>Use debian:stretch-slim for freebindfree builds<commit_after># Freebind build
# node:12-slim uses debian:stretch-slim as a base, so it's safe to build on here.
FROM debian:stretch-slim as freebind 

RUN apt-get update \
 && apt-get install -y git build-essential

RUN git clone https://github.com/matrix-org/freebindfree.git
RUN cd freebindfree && make

# Typescript build
FROM node:12-slim as builder

WORKDIR /build

RUN apt-get update && apt-get install -y git python3 libicu-dev build-essential

COPY ./package.json /build/package.json
COPY ./package-lock.json /build/package-lock.json
COPY ./src /build/src
COPY ./tsconfig.json /build/tsconfig.json
COPY ./types /build/types

RUN npm ci
RUN npm run build

# App
FROM node:12-slim

RUN apt-get update && apt-get install -y sipcalc iproute2 openssl --no-install-recommends
RUN rm -rf /var/lib/apt/lists/*
RUN mkdir app
{'fraction_non_alphanumeric': 0.10630407911001236, 'fraction_numerical': 0.009888751545117428, 'mean_word_length': 3.679190751445087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '553692', 'n_tokens_mistral': 566, 'n_tokens_neox': 536, 'n_words': 182}