Init sql on startup

This commit is contained in:
Dave Pedu 2016-02-13 16:03:15 -08:00
parent 920353a790
commit f2b6028daf
3 changed files with 17 additions and 1 deletions

View File

@ -15,8 +15,9 @@ RUN locale-gen en && \
COPY supervisord-mariadb.conf /etc/supervisor/conf.d/mariadb.conf
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ADD start /start
EXPOSE 3306
ENTRYPOINT ["supervisord"]
ENTRYPOINT ["start"]

6
README.md Normal file
View File

@ -0,0 +1,6 @@
docker-mariadb
==============
MariaDB (mysql) in a container.
Suggested usage: `docker run -d -p 3306:3306 -v /host/overrides.conf:/etc/mysql/conf.d/overrides.conf -v /host/sqldata:/var/lib/mysql mariadb`

9
start Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
trap 'kill $(jobs -p)' EXIT
if [ ! -d /var/lib/mysql/mysql ] ; then
/usr/bin/mysql_install_db
fi
supervisord