summaryrefslogtreecommitdiffstats
path: root/Services/mariadb/Dockerfile
blob: eaead315031fc3a49713553821d5260240b3f8ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM startx/fedora
MAINTAINER Christophe LARUE <dev@startx.fr>

RUN yum -y install \
    mariadb-libs \
    mariadb-server \
    mariadb \
    && yum clean all \
    && mkdir -p /var/log/mysql \
    && mkdir -p /sx \
    && touch /var/log/mysql/.keep /var/lib/mysql/.keep \
    && chown -R mysql:mysql /var/log/mysql /var/lib/mysql \
    && mkdir -p /tmp/sql 
COPY sx/* /sx/
COPY *.sql /tmp/sql/
RUN chmod ug+rx /sx/mariadb* /tmp/sql \
    && chown -R mysql:mysql /sx/mariadb* /tmp/sql

EXPOSE 3306
VOLUME ["/var/lib/mysql", "/var/log/mysql"]

USER mysql
# if you wan't to set root password, otherwise auto-generated
# see docker logs <containerId>
ENV mysql_newadminpwd newRootPassword


#ENDPOINT ["/sx/mariadb_run.sh"]
CMD ["/sx/mariadb_run.sh"]