diff options
author | startxfr <clarue@startx.fr> | 2015-11-28 19:46:13 +0100 |
---|---|---|
committer | startxfr <clarue@startx.fr> | 2015-11-28 19:46:13 +0100 |
commit | 348568c89ae1ad19270e930c02a1492bc43e99b1 (patch) | |
tree | 97514774d5c27789d9383f5085103eb9775b6a52 /Services/mariadb/Dockerfile | |
parent | 05c9aa4a4d3572168878bf0e81eeac724a95454d (diff) | |
download | phpmyadmin-348568c89ae1ad19270e930c02a1492bc43e99b1.tar.gz phpmyadmin-348568c89ae1ad19270e930c02a1492bc43e99b1.tar.bz2 phpmyadmin-348568c89ae1ad19270e930c02a1492bc43e99b1.tar.xz phpmyadmin-348568c89ae1ad19270e930c02a1492bc43e99b1.zip |
Adding display of OS flavour at startup and improving flexibility of services with env param
Diffstat (limited to 'Services/mariadb/Dockerfile')
-rw-r--r-- | Services/mariadb/Dockerfile | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/Services/mariadb/Dockerfile b/Services/mariadb/Dockerfile index 5efa265..047cdda 100644 --- a/Services/mariadb/Dockerfile +++ b/Services/mariadb/Dockerfile @@ -1,25 +1,29 @@ FROM startx/fedora MAINTAINER Christophe LARUE <dev@startx.fr> +USER root RUN dnf -y install mariadb-common mariadb-libs mariadb-config mariadb-errmsg mariadb-server mariadb \ && dnf 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 \ + && mkdir -p /var/logs/mariadb \ + && touch /var/logs/mariadb/.keep /var/lib/mariadb/.keep \ + && chown -R mariadb:mariadb /var/logs/mariadb /var/lib/mariadb \ && mkdir -p /tmp/sql -COPY sx/* /sx/ +ENV STARTUPLOG=/data/logs/mariadb/startup.log +COPY *.sh /bin/ COPY *.sql /tmp/sql/ +RUN chmod 775 /bin/run.sh && \ + mkdir /data && \ + mkdir /data/mariadb && \ + mkdir /data/logs && \ + mkdir /data/logs/mariadb && \ + touch $STARTUPLOG +COPY ./ /data/www +RUN rm -f /data/www/Dockerfile /data/www/httpd.conf /data/www/run.sh /data/www/sx-httpd.sh && \ + chown -R apache:apache /data/www /data/logs 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"] +VOLUME ["/data/mariadb", "/var/logs/mariadb"] -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"]
\ No newline at end of file +CMD ["/sx/run.sh"]
\ No newline at end of file |