Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.9k views
in Technique[技术] by (71.8m points)

docker开发thinkphpy访问速度很慢

docker环境:

centos8
bt面板
nginx
php7.0
mysql5.6

应用为thinkphp5.0项目

最开始怀疑是mysql在docker环境运行很慢,切换到远程数据库问题依旧存在。平均每页面响应时间为5-10s,求助各位大牛,有无解决办法

代码挂载在宿主机目录。bt面板及ls该目录速度一切正常,tp框架及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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...