1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 03:48:44 +00:00

fix mysql

This commit is contained in:
kev 2015-05-18 16:57:30 +08:00
parent f1edd7ce6a
commit 8d2545242d
2 changed files with 13 additions and 7 deletions

@ -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 .

@ -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
```