<commit_before>FROM ubuntu:precise
MAINTAINER <NAME> <<EMAIL>>

# Ensure everything is UTF-8, because there's no reason in the world why not.
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8 
RUN locale-gen en_US.UTF-8

# Install MariaDB PPA
ADD conf/apt/mariadb.list /etc/apt/sources.list.d/mariadb.list
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db \
     && apt-get update -q 2 \
     && DEBIAN_FRONTEND=noninteractive apt-get install --yes -q 2 mariadb-server pwgen 

# Run Initial Setup
ADD scripts/mariadb-first-run.sh /usr/local/bin/mariadb-first-run

RUN chmod +x /usr/local/bin/mariadb-first-run \
    && exec /usr/local/bin/mariadb-first-run \
    && rm /usr/local/bin/mariadb-first-run

# Add Main Startup Script
ADD scripts/mariadb-startup.sh /usr/local/bin/mariadb

RUN chmod +x /usr/local/bin/mariadb

# Run MariaDB as the 'mysql' User
USER mysql

# Mount Shared Volumes
VOLUME ["/etc/mysql/"]
VOLUME ["/var/lib/mysql"]
VOLUME ["/var/log"]

# Expose TCP Port 3306
EXPOSE 3306

# Set Main Command
CMD ["/usr/local/bin/mariadb"]
<commit_msg>Okay, so. Here's the plan. /usr/local/bin/mariadb will see if mariadb-first-run is present. If it is, run it. If that succeeds, remove it. Make sure we can drop privileges or that MySQL can run as a non-root user.<commit_after>FROM ubuntu:precise
MAINTAINER <NAME> <<EMAIL>>

# Ensure everything is UTF-8, because there's no reason in the world why not.
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8 
RUN locale-gen en_US.UTF-8

# Install MariaDB PPA
ADD conf/apt/mariadb.list /etc/apt/sources.list.d/mariadb.list
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db \
     && apt-get update -q 2 \
     && DEBIAN_FRONTEND=noninteractive apt-get install --yes -q 2 mariadb-server pwgen 

# Run Initial Setup
ADD scripts/mariadb-first-run.sh /usr/local/bin/mariadb-first-run
ADD scripts/mariadb-startup.sh /usr/local/bin/mariadb

RUN chmod +x /usr/local/bin/mariadb-first-run \
    /usr/local/bin/mariadb

# Mount Shared Volumes
VOLUME ["/etc/mysql/"]
VOLUME ["/var/lib/mysql"]
VOLUME ["/var/log"]

# Expose TCP Port 3306
EXPOSE 3306

# Set Main Command
CMD ["/usr/local/bin/mariadb"]

{'fraction_non_alphanumeric': 0.1263014938886374, 'fraction_numerical': 0.021729289271163424, 'mean_word_length': 3.510204081632653, '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': '4454333', 'n_tokens_mistral': 917, 'n_tokens_neox': 869, 'n_words': 227}