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

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

VOLUME ["/var/lib/mysql", "/var/log/mysql"]
USER mysql

EXPOSE 3306

#CMD ["/usr/libexec/mysqld"]
CMD ["/bin/mariadb_run.sh"]
ONBUILD CMD ["/bin/mariadb_run.sh"]