diff options
author | startxfr <clarue@startx.fr> | 2015-11-28 21:04:24 +0100 |
---|---|---|
committer | startxfr <clarue@startx.fr> | 2015-11-28 21:04:24 +0100 |
commit | 7b3b27e440b076f7a599555eaf963e719caab080 (patch) | |
tree | 1f6caa5506433de8850a66316abf1db80fc5ed01 /Services/mariadb/Dockerfile | |
parent | 59bbf66b7b1e4490694f2c5f732ddf9380acf053 (diff) | |
download | phpmyadmin-7b3b27e440b076f7a599555eaf963e719caab080.tar.gz phpmyadmin-7b3b27e440b076f7a599555eaf963e719caab080.tar.bz2 phpmyadmin-7b3b27e440b076f7a599555eaf963e719caab080.tar.xz phpmyadmin-7b3b27e440b076f7a599555eaf963e719caab080.zip |
start reshape of mysql container
Diffstat (limited to 'Services/mariadb/Dockerfile')
-rw-r--r-- | Services/mariadb/Dockerfile | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Services/mariadb/Dockerfile b/Services/mariadb/Dockerfile index 047cdda..fbeacce 100644 --- a/Services/mariadb/Dockerfile +++ b/Services/mariadb/Dockerfile @@ -3,27 +3,27 @@ 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/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 -ENV STARTUPLOG=/data/logs/mariadb/startup.log + && dnf clean all && \ + mkdir -p /tmp/sql +ENV MY_CONF=/etc/my.cnf \ + STARTUPLOG=/data/logs/mariadb/startup.log \ + LOG_PATH=/data/logs/mariadb \ + DATA_PATH=/data/mariadb \ + LOADSQL_PATH=/tmp/sql COPY *.sh /bin/ -COPY *.sql /tmp/sql/ +COPY my.cnf $MY_CONF +COPY *.sql $LOADSQL_PATH/ RUN chmod 775 /bin/run.sh && \ + chmod ug+r $MY_CONF && \ 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 + mkdir $DATA_PATH && \ + mkdir $LOG_PATH && \ + touch $STARTUPLOG && \ + touch $DATA_PATH/.keep && \ + chown -R mariadb:mariadb $LOG_PATH $DATA_PATH $LOADSQL_PATH EXPOSE 3306 -VOLUME ["/data/mariadb", "/var/logs/mariadb"] +VOLUME [$DATA_PATH,$LOG_PATH] CMD ["/sx/run.sh"]
\ No newline at end of file |