<commit_before>FROM openjdk:17-jdk-bullseye as builder

COPY target/glowroot-central-*.zip /tmp/glowroot-central.zip
RUN useradd --no-log-init -r -g root glowroot
RUN unzip -d /tmp /tmp/glowroot-central.zip \
    && chown -R glowroot:root /tmp/glowroot-central \
    && chmod -R g+rw /tmp/glowroot-central

FROM openjdk:17-jdk-bullseye

COPY docker-entrypoint.sh /usr/local/bin/
COPY glowroot-central.sh /usr/local/bin/

RUN useradd --no-log-init -r -g root glowroot

COPY --from=builder --chown=glowroot:root /tmp/glowroot-central /usr/share/glowroot-central

WORKDIR /usr/share/glowroot-central

RUN chmod a+x /usr/local/bin/docker-entrypoint.sh \
    && chmod a+x /usr/local/bin/glowroot-central.sh \
    && sed -i 's/^cassandra.contactPoints=$/cassandra.contactPoints=cassandra/' /usr/share/glowroot-central/glowroot-central.properties \
    && echo '\ncassandra.symmetricEncryptionKey=' >> /usr/share/glowroot-central/glowroot-central.properties

EXPOSE 4000 8181

USER glowroot:root

ENV GLOWROOT_OPTS ""

ENTRYPOINT ["docker-entrypoint.sh"]

CMD ["glowroot-central.sh"]<commit_msg>grant g+w to /usr/share/glowroot-central before sed invocation (#939)<commit_after>FROM openjdk:17-jdk-bullseye as builder

COPY target/glowroot-central-*.zip /tmp/glowroot-central.zip
RUN useradd --no-log-init -r -g root glowroot
RUN unzip -d /tmp /tmp/glowroot-central.zip \
    && chown -R glowroot:root /tmp/glowroot-central \
    && chmod -R g+rw /tmp/glowroot-central

FROM openjdk:17-jdk-bullseye

COPY docker-entrypoint.sh /usr/local/bin/
COPY glowroot-central.sh /usr/local/bin/

RUN useradd --no-log-init -r -g root glowroot

COPY --from=builder --chown=glowroot:root /tmp/glowroot-central /usr/share/glowroot-central

WORKDIR /usr/share/glowroot-central

# need to give group write permission because OpenShift will ignore USER directives
# and run the POD as a numbered userid which cannot possibly exist on the underlying physical host
# but which is guaranteed to be a member of the "root" group
RUN chmod g+w /usr/share/glowroot-central \
    && chmod a+x /usr/local/bin/docker-entrypoint.sh \
    && chmod a+x /usr/local/bin/glowroot-central.sh \
    && sed -i 's/^cassandra.contactPoints=$/cassandra.contactPoints=cassandra/' /usr/share/glowroot-central/glowroot-central.properties \
    && echo '\ncassandra.symmetricEncryptionKey=' >> /usr/share/glowroot-central/glowroot-central.properties

EXPOSE 4000 8181

USER glowroot:root

ENV GLOWROOT_OPTS ""

ENTRYPOINT ["docker-entrypoint.sh"]

CMD ["glowroot-central.sh"]
{'fraction_non_alphanumeric': 0.12960760998810938, 'fraction_numerical': 0.01070154577883472, 'mean_word_length': 3.853846153846154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6392608', 'n_tokens_mistral': 982, 'n_tokens_neox': 904, 'n_words': 199}