<commit_before># DOCKER-VERSION 17.03.1-ce
# VERSION 0.3.0

FROM debian:stretch-slim
MAINTAINER <NAME> <<EMAIL>>

ENV DEBIAN_FRONTEND noninteractive

ARG WAIT_FOR_VOLUME_PATH
ARG POSTGRES_VERSION

RUN \
# Package installations
&&  apt-get update \
&&  apt-get install -y --no-install-recommends \
        "postgresql-client-${POSTGRES_VERSION}" \

# Cleanup
&&  apt-get clean \
&&  rm -rf \
        /var/lib/apt/lists/* \
        /var/tmp/* \
        /tmp/* \

# Create wait_for-volume directory
&& mkdir -p "${WAIT_FOR_VOLUME_PATH}"

COPY ./content/postgres "${WAIT_FOR_VOLUME_PATH}"
COPY ./scripts/monitor_postgres_status /usr/local/bin/
RUN chmod +x \
        "${WAIT_FOR_VOLUME_PATH}"/postgres \
        /usr/local/bin/monitor_postgres_status

ENTRYPOINT ["monitor_postgres_status"]
<commit_msg>Add hack for missing man directories that seem to be expected<commit_after># DOCKER-VERSION 17.03.1-ce
# VERSION 0.3.0

FROM debian:stretch-slim
MAINTAINER <NAME> <<EMAIL>>

ENV DEBIAN_FRONTEND noninteractive

ARG WAIT_FOR_VOLUME_PATH
ARG POSTGRES_VERSION

RUN \
# This hack is necessary, so "postgresql-client-${POSTGRES_VERSION}"
# can add the symlink to its man page and doesn't fail installing.
    mkdir -p \
        /usr/share/man/man1 \
        /usr/share/man/man7 \

# Package installations
&&  apt-get update \
&&  apt-get install -y --no-install-recommends \
        "postgresql-client-${POSTGRES_VERSION}" \

# Cleanup
&&  apt-get clean \
&&  rm -rf \
        /var/lib/apt/lists/* \
        /var/tmp/* \
        /tmp/* \

# Create wait_for-volume directory
&& mkdir -p "${WAIT_FOR_VOLUME_PATH}"

COPY ./content/postgres "${WAIT_FOR_VOLUME_PATH}"
COPY ./scripts/monitor_postgres_status /usr/local/bin/
RUN chmod +x \
        "${WAIT_FOR_VOLUME_PATH}"/postgres \
        /usr/local/bin/monitor_postgres_status

ENTRYPOINT ["monitor_postgres_status"]

{'fraction_non_alphanumeric': 0.1302475780409042, 'fraction_numerical': 0.00968783638320775, 'mean_word_length': 3.094713656387665, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1935960', 'n_tokens_mistral': 699, 'n_tokens_neox': 679, 'n_words': 140}