forked from docker/midPoint_container
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Switch MariaDB in targets to TIER one
(This one is not currently used anyway.)
Showing
1 changed file
with
6 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,7 @@ | ||
FROM centos:centos7 | ||
FROM tier/mariadb:mariadb10 | ||
|
||
LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" | ||
|
||
COPY container_files/seed-data/ /seed-data/ | ||
|
||
RUN yum install -y epel-release \ | ||
&& yum update -y \ | ||
&& yum install -y mariadb-server mariadb \ | ||
&& yum clean all \ | ||
&& rm -rf /var/cache/yum | ||
|
||
RUN mysql_install_db \ | ||
&& chown -R mysql:mysql /var/lib/mysql/ \ | ||
&& sed -i 's/^\(bind-address\s.*\)/# \1/' /etc/my.cnf \ | ||
&& sed -i 's/^\(log_error\s.*\)/# \1/' /etc/my.cnf \ | ||
&& sed -i 's/\[mysqld\]/\[mysqld\]\ncharacter_set_server = utf8/' /etc/my.cnf \ | ||
&& sed -i 's/\[mysqld\]/\[mysqld\]\ncollation_server = utf8_general_ci/' /etc/my.cnf \ | ||
&& sed -i 's/\[mysqld\]/\[mysqld\]\nport = 3306/' /etc/my.cnf \ | ||
&& cat /etc/my.cnf \ | ||
&& echo "/usr/bin/mysqld_safe &" > /tmp/config \ | ||
&& echo "mysqladmin --silent --wait=30 ping || exit 1" >> /tmp/config \ | ||
&& echo "mysql -e 'GRANT ALL PRIVILEGES ON *.* TO \"root\"@\"%\" WITH GRANT OPTION;'" >> /tmp/config \ | ||
&& echo "mysql -e 'CREATE DATABASE target CHARACTER SET utf8 COLLATE utf8_bin;'" >> /tmp/config \ | ||
&& bash /tmp/config \ | ||
&& rm -f /tmp/config \ | ||
&& mysql target < /seed-data/target.sql | ||
|
||
EXPOSE 3306 | ||
|
||
CMD mysqld_safe | ||
#TODO better name for the target database | ||
ENV MYSQL_DATABASE target | ||
ENV MYSQL_USER target_user | ||
ENV MYSQL_PASSWORD fdjskjrkwqjrw | ||
ENV MYSQL_DATADIR /var/lib/mysql |