<commit_before>FROM postgres:10-alpine

ENV PGTAP_VERSION v0.99.0

RUN apk --no-cache add \
    alpine-sdk \
    perl \
 && git clone https://github.com/theory/pgtap \
 && cd pgtap \
 && git checkout ${PGTAP_VERSION} \
 && make \
 && make install \
 && cd .. \
 && git clone https://github.com/gavinwahl/postgres-json-schema \
 && cd postgres-json-schema \
 && make install


FROM postgres:10-alpine

COPY --from=0 /usr/local/share/postgresql/extension/pgtap*                /usr/local/share/postgresql/extension/
COPY --from=0 /usr/local/share/postgresql/extension/postgres-json-schema* /usr/local/share/postgresql/extension/
COPY postgresql.conf /etc/postgresql.conf

RUN chown postgres:postgres /etc/postgresql.conf \
 && apk --no-cache add \
    build-base \
    perl-dev \
 && cpan TAP::Parser::SourceHandler::pgTAP \
 && apk del -r build-base

CMD ["postgres", "-c", "config_file=/etc/postgresql.conf"]
<commit_msg>update PostgreSQL to 11.x<commit_after>FROM postgres:11-alpine

ENV PGTAP_VERSION v0.99.0

RUN apk --no-cache add \
    alpine-sdk \
    perl \
 && git clone https://github.com/theory/pgtap \
 && cd pgtap \
 && git checkout ${PGTAP_VERSION} \
 && make \
 && make install \
 && cd .. \
 && git clone https://github.com/gavinwahl/postgres-json-schema \
 && cd postgres-json-schema \
 && make install


FROM postgres:11-alpine

COPY --from=0 /usr/local/share/postgresql/extension/pgtap*                /usr/local/share/postgresql/extension/
COPY --from=0 /usr/local/share/postgresql/extension/postgres-json-schema* /usr/local/share/postgresql/extension/
COPY postgresql.conf /etc/postgresql.conf

RUN chown postgres:postgres /etc/postgresql.conf \
 && apk --no-cache add \
    build-base \
    perl-dev \
 && cpan TAP::Parser::SourceHandler::pgTAP \
 && apk del -r build-base

CMD ["postgres", "-c", "config_file=/etc/postgresql.conf"]

{'fraction_non_alphanumeric': 0.1558791801510248, 'fraction_numerical': 0.011866235167206042, 'mean_word_length': 3.0064794816414686, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '309230', 'n_tokens_mistral': 702, 'n_tokens_neox': 667, 'n_words': 127}