docker环境:
centos8
bt面板
nginx
php7.0
mysql5.6
最开始怀疑是mysql在docker环境运行很慢,切换到远程数据库问题依旧存在。平均每页面响应时间为5-10s
代码挂载在宿主机目录。bt面板及ls该目录速度一切正常。测试过lavarel框架,访问也很慢
dockerfile附上
FROM centos:latest AS build
LABEL author="ncluoyu"
RUN rm -f /etc/init.d
&& mkdir -p /www/init.d
&& ln -s /www/init.d /etc/init.d
&& chmod +x /start.sh
&& mkdir -p /www/wwwroot
&& cd /home
&& yum -y update
&& yum install -y wget
&& wget -O install.sh http://download.bt.cn/install/install_6.0.sh
&& echo y | sh install.sh
&& yum clean all
RUN bash /www/server/panel/install/install_soft.sh 0 install nginx 1.17
RUN bash /www/server/panel/install/install_soft.sh 0 install php 7.1 || echo 'Ignore Error'
RUN bash /www/server/panel/install/install_soft.sh 0 install mysql 5.6
WORKDIR /www/wwwroot
EXPOSE 8888 80
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…