chaiyd / zentao Goto Github PK
View Code? Open in Web Editor NEW禅道dockerfile
禅道dockerfile
SQLSTATE[HY000] [2002] No such file or directory
无法连接数据库,报这个错
按照作者提供的dockerfile,我仅仅将禅道版本由最新版修改为11.2,修改后可以启动zentao,并可以正常使用,但是重启容器时出错。错误如下:
我按照官网上的启动命令启动,数据库密码为123456,没有修改
https://www.zentao.net/download/80098.html
dockerfile如下:
FROM ubuntu:16.04
MAINTAINER yidong <[email protected]>
RUN apt-get update && apt-get install -y apache2 mariadb-server php php-curl php-gd php-ldap php-mbstring php-mcrypt php-mysql php-xml php-zip php-cli php-json curl unzip libapache2-mod-php locales
ENV LANG="en_US.UTF8"
ENV MYSQL_ROOT_PASSWORD="123456"
RUN echo -e "LANG=\"en_US.UTF-8\"\nLANGUAGE=\"en_US:en\"" > /etc/default/locale && locale-gen en_US.UTF-8
ARG ZENTAO_VERSION=11.2
RUN mkdir -p /app/zentaopms
COPY docker-entrypoint.sh /app
RUN chmod 777 /app/docker-entrypoint.sh
RUN curl http://dl.cnezsoft.com/zentao/${ZENTAO_VERSION}/ZenTaoPMS.${ZENTAO_VERSION}.stable.zip -o /var/www/zentao.zip
RUN cd /var/www/ && unzip -q zentao.zip && rm zentao.zip
RUN a2enmod rewrite
RUN rm -rf /etc/apache2/sites-enabled/000-default.conf /var/lib/mysql/*
RUN sed -i '1i ServerName 127.0.0.1' /etc/apache2/apache2.conf
COPY config/apache.conf /etc/apache2/sites-enabled/000-default.conf
COPY config/ioncube_loader_lin_7.0.so /usr/lib/php/20151012/ioncube_loader_lin_7.0.so
COPY config/00-ioncube.ini /etc/php/7.0/apache2/conf.d/
COPY config/00-ioncube.ini /etc/php/7.0/cli/conf.d/
VOLUME /app/zentaopms /var/lib/mysql
ENTRYPOINT ["/app/docker-entrypoint.sh"]
docker-entrypoint如下:
#!/usr/bin/env bash
[ $DEBUG ] && set -x
if [ "`ls -A /app/zentaopms`" = "" ]; then
cp -a /var/www/zentaopms/* /app/zentaopms
fi
if [ "`cat /app/zentaopms/VERSION`" != "`cat /var/www/zentaopms/VERSION`" ]; then
cp -a /var/www/zentaopms/* /app/zentaopms
fi
chmod -R 777 /app/zentaopms/www/data
chmod -R 777 /app/zentaopms/tmp
chmod 777 /app/zentaopms/www
chmod 777 /app/zentaopms/config
chmod -R a+rx /app/zentaopms/bin/*
/etc/init.d/apache2 start
chown -R www-data:www-data /app/zentaopms
chown -R mysql:mysql /var/lib/mysql/
if [ "`ls -A /var/lib/mysql/`" = "" ]; then
mysql_install_db --defaults-file=/etc/mysql/my.cnf
/etc/init.d/mysql start
/usr/bin/mysqladmin -uroot password $MYSQL_ROOT_PASSWORD
mysql -uroot -e "UPDATE mysql.user SET plugin='mysql_native_password' WHERE user='root';FLUSH PRIVILEGES;"
else
/etc/init.d/mysql start
fi
tail -f /var/log/apache2/zentao_error_log
已经有一个 env-example
.env 是用户的自定义配置文件,
存储自定义数据的,
一般不提交到库里面。
安装到生成配置文件,填写数据库配置时保存了。。。
我的数据库版本:Server version: 8.0.19 MySQL Community Server - GPL
报错信息:数据库连接失败 SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
Shell - Get latest release from GitHub
https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.