<commit_before>FROM alpine:edge

COPY composer.json msml /opt/msml/
COPY config/ /opt/msml/config
COPY src/ /opt/msml/src/

RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
    apk update && apk upgrade && \
    apk add composer@testing php5-openssl mlmmj openssh ca-certificates php7@testing php7-json@testing php7-dom@testing  php7-ctype@testing php7-mbstring@testing php7-openssl@testing && \
    cd /opt/msml && php5 /usr/bin/composer install --prefer-dist --ignore-platform-reqs && \
    apk del composer php5 php5-openssl && \
    rm -rf /var/cache/apk/*

WORKDIR /workdir
VOLUME ["/workdir", "/var/spool/mlmmh"]

LABEL io.whalebrew.config.volumes '["/var/spool/mlmmj:/var/spool/mlmmj"]'

ENTRYPOINT ["/opt/msml/msml"]
<commit_msg>Improved Docker configuration<commit_after>FROM composer AS build-env

COPY . /opt/msml/

RUN composer global require kherge/box --prefer-dist --update-no-dev
RUN cd /opt/msml && composer install --prefer-dist --no-dev

RUN echo "phar.readonly=false" > "$PHP_INI_DIR/conf.d/phar-not-readonly.ini"
RUN cd /opt/msml && /composer/vendor/bin/box build -v --no-interaction

FROM php:7-alpine

COPY --from=build-env /opt/msml/msml.phar /opt/msml/msml.phar

RUN apk add --update tini mlmmj && rm -rf /var/cache/apk/*

WORKDIR /workdir
VOLUME ["/workdir", "/var/spool/mlmmj"]

LABEL io.whalebrew.config.volumes '["/var/spool/mlmmj:/var/spool/mlmmj"]'
LABEL io.whalebrew.config.working_dir '$PWD'

ENTRYPOINT ["/sbin/tini", "--", "php", "/opt/msml/msml.phar"]

{'fraction_non_alphanumeric': 0.16351791530944626, 'fraction_numerical': 0.0071661237785016286, 'mean_word_length': 3.6686930091185412, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '553832', 'n_tokens_mistral': 624, 'n_tokens_neox': 590, 'n_words': 122}