FROM centos:centos7.9.2009 USER root WORKDIR /www RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo && \ yum install -y yum-utils && \ yum-config-manager --add-repo http://mirrors.aliyun.com/repo/epel-7.repo && \ yum install -y net-tools nginx && \ yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm && \ yum-config-manager --enable remi-php80 && \ yum install -y libzip libgd oniguruma oniguruma-devel && \ yum install -y php php-{cli,fpm,mysqlnd,zip,devel,gd,mbstring,curl,xml,pear,bcmath,json,fileinfo,opcache,redis,mcrypt,imagemagick,Swoole4} && \ yum clean packages && rm -rf /var/cache/yum COPY php80 /php80 COPY nginx.conf /etc/nginx/nginx.conf COPY pathinfo.conf /etc/nginx/pathinfo.conf COPY startup.sh /usr/bin/startup.sh #拷贝数据 RUN chown nginx: -R /www/public CMD ["/usr/bin/startup.sh"]