<commit_before># Dockerfile for moodle instance.
# Forked from <NAME>'s <<EMAIL>> docker version. https://github.com/jmhardison/docker-moodle
#Original Maintainer <NAME> <<EMAIL>>

FROM  php:7.2-apache

# Replace for later version

VOLUME ["/var/moodledata"]
EXPOSE 80

ENV MOODLE_DB_TYPE $DB_TYPE
# Let the container know that there is no tty
ENV DEBIAN_FRONTEND noninteractive \
	MOODLE_URL http://0.0.0.0 \
    MOODLE_ADMIN admin \
    MOODLE_ADMIN_PASSWORD <PASSWORD> \
    MOODLE_ADMIN_EMAIL <EMAIL> \
    MOODLE_DB_HOST '' \
    MOODLE_DB_PASSWORD '' \
    MOODLE_DB_USER '' \
    MOODLE_DB_NAME '' \
    MOODLE_DB_PORT '3306'

RUN echo "Build moodle version ${VERSION}" &&\
	apt-get update &&\
	apt-get -f -y install --no-install-recommends rsync netcat libxmlrpc-c++8-dev libxml2-dev libpng-dev libicu-dev libmcrypt-dev libzip-dev &&\
 	docker-php-ext-install xmlrpc && \
	docker-php-ext-install mbstring && \
	whereis libzip &&\
	docker-php-ext-configure zip --with-libzip=/usr/lib/x86_64-linux-gnu/libzip.so &&\
	docker-php-ext-install zip &&\
	docker-php-ext-install xml &&\
	docker-php-ext-install intl &&\
 	docker-php-ext-install soap &&\
	docker-php-ext-install gd &&\
	docker-php-ext-install opcache &&\ 
	apt-get autopurge -y &&\
	apt-get autoremove -y &&\
	apt-get autoclean &&\
	rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* cache/* /var/lib/log/*

ARG	DB_TYPE="all"

RUN apt-get update && \
	echo ${DB_TYPE} &&\
	if [ $DB_TYPE = "mysqli" ] || [ $DB_TYPE = "all" ]; then echo "Setup mysql and mariadb support" &&\
		 docker-php-ext-install pdo mysqli pdo_mysql;\
	fi &&\
	if [ $DB_TYPE = "pgsql" ] || [ $DB_TYPE = "all" ]; then echo "Setup postgresql support" &&\
		apt-get install -y --no-install-recommends libghc-postgresql-simple-dev &&\
     	docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql &&\
        docker-php-ext-install pdo pgsql pdo_pgsql; \ 
	fi &&\
	apt-get autopurge -y &&\
	apt-get autoremove -y &&\
	apt-get autoclean &&\
	rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* cache/* /var/lib/log/*

ARG VERSION=37

RUN	echo "Installing moodle ${VERSION}" && \
	cd /usr/src &&\
	curl -s -N  http://download.moodle.org/download.php/direct/stable${VERSION}/moodle-latest-${VERSION}.tgz | tar -xvz && \
	ls -l /usr/src/moodle &&\
	rm -rf /var/www/html/index.html && \
	chown www-data:www-data -R /usr/src/moodle && \
	rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* cache/* /var/lib/log/* &&\
	cd /var/www/html


COPY ./scripts/moodle-config.php /usr/src/moodle/config.php
COPY ./scripts/detect_mariadb.php /opt/detect_mariadb.php
COPY ./scripts/entrypoint.sh /usr/local/bin/entrypoint.sh

RUN chown root:root /usr/local/bin/entrypoint.sh &&\
	chmod +x /usr/local/bin/entrypoint.sh

CMD [ "/usr/local/bin/entrypoint.sh", "/usr/sbin/apache2ctl", "-D", "FOREGROUND"]<commit_msg>Remove Unwanted Mkdir.<commit_after># Dockerfile for moodle instance.
# Forked from <NAME>'s <<EMAIL>> docker version. https://github.com/jmhardison/docker-moodle
#Original Maintainer <NAME> <<EMAIL>>

FROM  php:7.2-apache

# Replace for later version

VOLUME ["/var/moodledata"]
EXPOSE 80

ENV MOODLE_DB_TYPE $DB_TYPE
# Let the container know that there is no tty
ENV DEBIAN_FRONTEND noninteractive \
	MOODLE_URL http://0.0.0.0 \
    MOODLE_ADMIN admin \
    MOODLE_ADMIN_PASSWORD <PASSWORD> \
    MOODLE_ADMIN_EMAIL <EMAIL> \
    MOODLE_DB_HOST '' \
    MOODLE_DB_PASSWORD '' \
    MOODLE_DB_USER '' \
    MOODLE_DB_NAME '' \
    MOODLE_DB_PORT '3306'

RUN echo "Build moodle version ${VERSION}" &&\
	apt-get update &&\
	apt-get -f -y install --no-install-recommends rsync netcat libxmlrpc-c++8-dev libxml2-dev libpng-dev libicu-dev libmcrypt-dev libzip-dev &&\
 	docker-php-ext-install xmlrpc && \
	docker-php-ext-install mbstring && \
	whereis libzip &&\
	docker-php-ext-configure zip --with-libzip=/usr/lib/x86_64-linux-gnu/libzip.so &&\
	docker-php-ext-install zip &&\
	docker-php-ext-install xml &&\
	docker-php-ext-install intl &&\
 	docker-php-ext-install soap &&\
	docker-php-ext-install gd &&\
	docker-php-ext-install opcache &&\ 
	apt-get autopurge -y &&\
	apt-get autoremove -y &&\
	apt-get autoclean &&\
	rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* cache/* /var/lib/log/*

ARG	DB_TYPE="all"

RUN apt-get update && \
	echo ${DB_TYPE} &&\
	if [ $DB_TYPE = "mysqli" ] || [ $DB_TYPE = "all" ]; then echo "Setup mysql and mariadb support" &&\
		 docker-php-ext-install pdo mysqli pdo_mysql;\
	fi &&\
	if [ $DB_TYPE = "pgsql" ] || [ $DB_TYPE = "all" ]; then echo "Setup postgresql support" &&\
		apt-get install -y --no-install-recommends libghc-postgresql-simple-dev &&\
     	docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql &&\
        docker-php-ext-install pdo pgsql pdo_pgsql; \ 
	fi &&\
	apt-get autopurge -y &&\
	apt-get autoremove -y &&\
	apt-get autoclean &&\
	rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* cache/* /var/lib/log/*

ARG VERSION=37

RUN	echo "Installing moodle ${VERSION}" && \
	curl -s -N  http://download.moodle.org/download.php/direct/stable${VERSION}/moodle-latest-${VERSION}.tgz | tar -xvz && \
	ls -l /usr/src/moodle &&\
	rm -rf /var/www/html/index.html && \
	chown www-data:www-data -R /usr/src/moodle && \
	rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* cache/* /var/lib/log/* &&\
	cd /var/www/html


COPY ./scripts/moodle-config.php /usr/src/moodle/config.php
COPY ./scripts/detect_mariadb.php /opt/detect_mariadb.php
COPY ./scripts/entrypoint.sh /usr/local/bin/entrypoint.sh

RUN chown root:root /usr/local/bin/entrypoint.sh &&\
	chmod +x /usr/local/bin/entrypoint.sh

CMD [ "/usr/local/bin/entrypoint.sh", "/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
{'fraction_non_alphanumeric': 0.1727207977207977, 'fraction_numerical': 0.007478632478632479, 'mean_word_length': 3.108997805413314, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 8, 'xml': 8}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5498940', 'n_tokens_mistral': 2350, 'n_tokens_neox': 2266, 'n_words': 457}