diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-04-11 01:12:28 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2018-04-11 01:12:28 +0300 |
commit | 165be0c6f6fb780988bccd1280c2895d4c15a5bd (patch) | |
tree | 99fe61a92fd2882719cf9dafa55d34458864161d /docker/lamp | |
parent | c02effea4986cc95dee0e27aef7663f1f6567906 (diff) |
docker: support to mount any external directory
Diffstat (limited to 'docker/lamp')
-rw-r--r-- | docker/lamp/Dockerfile | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docker/lamp/Dockerfile b/docker/lamp/Dockerfile index 6e937edb..0f7ae30e 100644 --- a/docker/lamp/Dockerfile +++ b/docker/lamp/Dockerfile @@ -15,10 +15,10 @@ source /usr/local/etc/library.sh; \ set +x; \ install_script /usr/local/etc/lamp.sh; \ -# mariaDB fixups (move database to /data, which will be in a persistent volume) -mkdir -p /data/; \ -mv /var/lib/mysql /data/database; \ -sed -i "s|^datadir.*|datadir = /data/database|" /etc/mysql/mariadb.conf.d/50-server.cnf; \ +# mariaDB fixups (move database to /data-ro, which will be in a persistent volume) +mkdir -p /data-ro /data; \ +mv /var/lib/mysql /data-ro/database; \ +sed -i "s|^datadir.*|datadir = /data-ro/database|" /etc/mysql/mariadb.conf.d/50-server.cnf; \ # package cleanup apt-get autoremove -y; \ @@ -30,7 +30,7 @@ rm /var/cache/debconf/*-old; \ rm -f /var/log/alternatives.log /var/log/apt/*; \ # specific cleanup -rm /data/database/ib_logfile*; \ +rm /data-ro/database/ib_logfile*; \ rm /usr/local/etc/lamp.sh COPY docker-common/lamp/010lamp /etc/services-enabled.d/ |