<commit_before>FROM tomcat:jre8

# Grab RAMADDA
RUN curl -SL \
  http://sourceforge.net/projects/ramadda/files/ramadda1.7/repository.war \
  -o webapps/repository.war

ENV DATA_DIR /data/repository

RUN mkdir -p $DATA_DIR

VOLUME $DATA_DIR

ENV JAVA_OPTS -d64 -Xmx4048m -Xms512m \
  -Dorg.apache.catalina.security.SecurityListener.UMASK=0007 -server \
  -Dramadda_home=$DATA_DIR -XX:PermSize=256m -XX:MaxPermSize=256m \
  -Dfile.encoding=utf-8

ENV CATALINA_OPTS -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true

# Create tomcat user
RUN groupadd -r tomcat && \
	useradd -g tomcat -d ${CATALINA_HOME} -s /sbin/nologin  -c \
  "Tomcat user" tomcat && chown -R tomcat:tomcat ${CATALINA_HOME}

WORKDIR $DATA_DIR

EXPOSE 8080

USER tomcat
<commit_msg>8080 already exposed from base image<commit_after>FROM tomcat:jre8

# Grab RAMADDA
RUN curl -SL \
  http://sourceforge.net/projects/ramadda/files/ramadda1.7/repository.war \
  -o webapps/repository.war

ENV DATA_DIR /data/repository

RUN mkdir -p $DATA_DIR

VOLUME $DATA_DIR

ENV JAVA_OPTS -d64 -Xmx4048m -Xms512m \
  -Dorg.apache.catalina.security.SecurityListener.UMASK=0007 -server \
  -Dramadda_home=$DATA_DIR -XX:PermSize=256m -XX:MaxPermSize=256m \
  -Dfile.encoding=utf-8

ENV CATALINA_OPTS -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true

# Create tomcat user
RUN groupadd -r tomcat && \
	useradd -g tomcat -d ${CATALINA_HOME} -s /sbin/nologin  -c \
  "Tomcat user" tomcat && chown -R tomcat:tomcat ${CATALINA_HOME}

WORKDIR $DATA_DIR

USER tomcat

{'fraction_non_alphanumeric': 0.11241830065359477, 'fraction_numerical': 0.03529411764705882, 'mean_word_length': 4.052805280528053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '763625', 'n_tokens_mistral': 660, 'n_tokens_neox': 611, 'n_words': 125}