<commit_before>FROM cloudunit/base-14.04

RUN set -ex \
	&& for key in \
		05AB33110949707C93A279E3D3EFE6B686867BA6 \
		07E48665A34DCAFAE522E5E6266191C37C037D42 \
		47309207D818FFD8DCD3F83F1931D684307A10A5 \
		541FBE7D8F78B25E055DDEE13C370389288584E7 \
		61B832AC2F1C5A90F0F9B00A1C506407564C17A3 \
		79F7026C690BAA50B92CD8B66A3AD3F4F22C4FED \
		80FF76D88A969FE46108558A80B953A041E49465 \
		8B39757B1D8A994DF2433ED58B3A601F08C975E5 \
		A27677289986DB50844682F8ACB77FC2E86E29AC \
		A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 \
		B3F49CD3B9BD2996DA90F817ED3873F5D3262722 \
		DCFD35E0BF8CA7344752DE8B6FB21E8933C60243 \
		F3A04C595DB5B6A5F1ECA43E3B7BBB100D811BBE \
		F7DA48BB64BCB84ECBA7EE6935CD23C10D498E23 \
	; do \
		gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
	done

# add custom scripts
ADD scripts /opt/cloudunit/scripts
RUN chmod +x /opt/cloudunit/scripts/*

# Create directory for CloudUnit
RUN mkdir -p /opt/cloudunit/tomcat &&  \
    mkdir -p /opt/cloudunit/tomcat/logs

ENV CATALINA_HOME /opt/cloudunit/tomcat
ENV CU_SOFTWARE $CATALINA_HOME
ENV CU_LOGS $CATALINA_HOME/logs

RUN echo "CU_SOFTWARE=$CU_SOFTWARE" >> /etc/environment && \
    echo "CU_LOGS=$CU_LOGS" >> /etc/environment && \
    echo "CATALINA_HOME=$CATALINA_HOME" >> /etc/environment

ENV JAVA_HOME /opt/cloudunit/java/jdk1.8.0_25
ENV PATH $CATALINA_HOME/bin:$PATH
RUN mkdir -p $CATALINA_HOME

ENV TOMCAT_MAJOR 8
ENV TOMCAT_VERSION 8.0.36<commit_msg>FEAT-add all server elements as env var<commit_after>FROM cloudunit/base-14.04

RUN set -ex \
	&& for key in \
		05AB33110949707C93A279E3D3EFE6B686867BA6 \
		07E48665A34DCAFAE522E5E6266191C37C037D42 \
		47309207D818FFD8DCD3F83F1931D684307A10A5 \
		541FBE7D8F78B25E055DDEE13C370389288584E7 \
		61B832AC2F1C5A90F0F9B00A1C506407564C17A3 \
		79F7026C690BAA50B92CD8B66A3AD3F4F22C4FED \
		80FF76D88A969FE46108558A80B953A041E49465 \
		8B39757B1D8A994DF2433ED58B3A601F08C975E5 \
		A27677289986DB50844682F8ACB77FC2E86E29AC \
		A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 \
		B3F49CD3B9BD2996DA90F817ED3873F5D3262722 \
		DCFD35E0BF8CA7344752DE8B6FB21E8933C60243 \
		F3A04C595DB5B6A5F1ECA43E3B7BBB100D811BBE \
		F7DA48BB64BCB84ECBA7EE6935CD23C10D498E23 \
	; do \
		gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
	done

# add custom scripts
ADD scripts /opt/cloudunit/scripts
RUN chmod +x /opt/cloudunit/scripts/*

# Create directory for CloudUnit
RUN mkdir -p /opt/cloudunit/tomcat &&  \
    mkdir -p /opt/cloudunit/tomcat/logs

# Set server environment variables (mandatory)

ENV CATALINA_HOME /opt/cloudunit/tomcat
ENV CU_SOFTWARE $CATALINA_HOME
ENV CU_SERVER_MANAGER_PATH /manager/html?
ENV CU_SERVER_MANAGER_PORT 8080
ENV CU_SERVER_PORT 8080
ENV CU_DEFAULT_LOG_FILE catalina.out
ENV CU_DEFAULT_JAVA_RELEASE jdk1.8.0_25


RUN echo "CU_SOFTWARE=$CU_SOFTWARE" >> /etc/environment && \
    echo "CU_LOGS=$CU_LOGS" >> /etc/environment && \
    echo "CU_SERVER_MANAGER_PATH=$CU_SERVER_MANAGER_PATH" >> /etc/environment && \
    echo "CU_SERVER_MANAGER_PORT=$CU_SERVER_MANAGER_PORT" >> /etc/environment && \
    echo "CU_SERVER_PORT=$CU_SERVER_PORT" >> /etc/environment && \
    echo "CU_DEFAULT_LOG_FILE=$CU_DEFAULT_LOG_FILE" >> /etc/environment && \
    echo "CU_DEFAULT_JAVA_RELEASE=$CU_DEFAULT_JAVA_RELEASE" >> /etc/environment

ENV JAVA_HOME /opt/cloudunit/java/jdk1.8.0_25
ENV PATH $CATALINA_HOME/bin:$PATH
RUN mkdir -p $CATALINA_HOME

ENV TOMCAT_MAJOR 8
ENV TOMCAT_VERSION 8.0.36
{'fraction_non_alphanumeric': 0.08172796263864565, 'fraction_numerical': 0.2227086981903094, 'mean_word_length': 5.119642857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, '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': '4039376', 'n_tokens_mistral': 2035, 'n_tokens_neox': 1602, 'n_words': 204}