added initialize-configs init script to populate the conf/ volume

`mysql` client fails when it is started from the docker run command line
due to missing `my.cnf`. To workaround this issue, we populate the
`conf/` volume from a `cont-init.d/01-initialize-configs` scripts.
This commit is contained in:
Sameer Naik
2015-09-23 15:17:57 +05:30
parent c8d5ae842e
commit d63a182a52
2 changed files with 7 additions and 4 deletions

View File

@@ -0,0 +1,7 @@
#!/usr/bin/with-contenv bash
set -e
source $BITNAMI_PREFIX/bitnami-utils.sh
if [ ! "$(ls -A $BITNAMI_APP_VOL_PREFIX/conf)" ]; then
generate_conf_files
fi

View File

@@ -4,10 +4,6 @@ source $BITNAMI_PREFIX/bitnami-utils.sh
print_welcome_page print_welcome_page
if [ ! "$(ls -A $BITNAMI_APP_VOL_PREFIX/conf)" ]; then
generate_conf_files
fi
mkdir -p $BITNAMI_APP_DIR/tmp mkdir -p $BITNAMI_APP_DIR/tmp
chown -R $BITNAMI_APP_USER:$BITNAMI_APP_USER $BITNAMI_APP_DIR/tmp || true chown -R $BITNAMI_APP_USER:$BITNAMI_APP_USER $BITNAMI_APP_DIR/tmp || true