From 8d2545242d64c8636f7e3c6747ad1a07713ec360 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 18 May 2015 16:57:30 +0800 Subject: [PATCH] fix mysql --- mantisbt/Dockerfile | 7 +------ mantisbt/README.md | 13 ++++++++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/mantisbt/Dockerfile b/mantisbt/Dockerfile index c8dcdc6..fc7d382 100644 --- a/mantisbt/Dockerfile +++ b/mantisbt/Dockerfile @@ -10,8 +10,7 @@ RUN a2enmod rewrite RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev \ && rm -rf /var/lib/apt/lists/* \ && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-install gd mysqli mbstring \ - && docker-php-ext-configure mysqli + && docker-php-ext-install gd mbstring mysql WORKDIR /var/www/html @@ -24,9 +23,5 @@ RUN curl -fSL ${MANTIS_URL} -o ${MANTIS_FILE} \ && echo "${MANTIS_MD5} ${MANTIS_FILE}" | md5sum -c - \ && tar -xz --strip-components=1 -f ${MANTIS_FILE} \ && rm ${MANTIS_FILE} \ - && sed -e "/g_hostname/s/'localhost'/'mysql'/" \ - -e "/g_db_username/s/'mantisdbuser'/'root'/" \ - -e "/g_db_password/s/''/'root'/" \ - config_inc.php.sample > config_inc.php \ && chown -R www-data:www-data . diff --git a/mantisbt/README.md b/mantisbt/README.md index fe1dd8a..4d80b81 100644 --- a/mantisbt/README.md +++ b/mantisbt/README.md @@ -15,9 +15,20 @@ mantisbt: restart: always db: - image: mariadb + image: mysql environment: - MYSQL_ROOT_PASSWORD=root - MYSQL_DATABASE=bugtracker restart: always ``` + +## setup + +``` +$ docker exec -it mantisbt_mantisbt_1 bash +>>> echo 'date.timezone = "Asia/Shanghai"' > /usr/local/etc/php/php.ini +>>> exit +$ firefox http://localhost/admin/install.php +>>> username: administrator +>>> password: root +```