# Nginx Server# Version 1.18.0FROM centos:7MAINTAINER 845573796@qq.comRUN yum -y install gcc gcc-c++ autoconf automake make wget pcre pcre-devel zlib-devel && yum clean all && rm -rf /var/cache/yum/*RUN wget http://nginx.org/download/nginx-1.18.0.tar.gz && tar zxvf nginx-1.18.0.tar.gz && cd nginx-1.18.0 && ./configure --prefix=/usr/local/nginx && make && make install && cd ../ && rm -rf nginx-1.18.0.tar.gz && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtimeENV PATH $PATH:/usr/local/nginx/sbinWORKDIR /usr/local/nginxEXPOSE 80CMD ["nginx", "-g", "daemon off;"]
# PHP-FPM# Version 7.2.33FROM centos:7MAINTAINER 845573796@qq.comRUN yum -y install gcc gcc-c++ autoconf automake make wget libxml2-devel libpng libpng-devel && yum clean all && rm -rf /var/cache/yum/*RUN wget https://www.php.net/distributions/php-7.2.33.tar.gz && tar zxvf php-7.2.33.tar.gz && cd php-7.2.33 && ./configure --prefix=/usr/local/php --enable-mysqlnd --with-mysqli=mysqlnd --enable-fpm --enable-gd-jis-conv --with-gd && make && make install && cd ../ && rm -rf php-7.2.33.tar.gz && rm -rf php-7.2.33 && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && cd /usr/local/php && cp ./etc/php-fpm.conf.default ./etc/php-fpm.conf && cp ./etc/php-fpm.d/www.conf.default ./etc/php-fpm.d/www.confWORKDIR /usr/local/phpEXPOSE 9000CMD ["./sbin/php-fpm", "-F"]