Nginx+php-fpm docker镜像合二为一
跳到导航
跳到搜索
进阶见 Alpine#alpine lnmp 也为docker准备
https://github.com/evan886/alpine-dockerbuild/tree/main/alpine_nginx_php7.4
docker build -t evan886/alpine_nginx_php7.4:v3.14 . docker push evan886/alpine_nginx_php7.4:v3.14 docker run -it --name alpine_nginx_php7.3 -p 80:80 alpine_nginx_php7.3:1 . docker run -it --name alpine_nginx_php7.3 -p 80:80 id 域名 默认为wp.linuxsa.org 目录其实就是 /var/www/html 还有个 docker pull evan886/wp:v5.8 docker build -t evan886/wp:v5.8 . tree . . ├── Dockerfile ├── usage └── wordpress-5.8-zh_CN.tar.gz cat Dockerfile FROM evan886/alpine_nginx_php7.4:v3.14 #ADD default.conf /etc/nginx/conf.d/ ADD wordpress-5.8-zh_CN.tar.gz /var/www/html/ RUN chown www-data:www-data -R /var/www/html docker run --name wp -p80:80 -d 54254a4fbae1 http://wp.linuxsa.org/wordpress/wp-admin/setup-config.php
see also
on qcloud nginx+php-fpm docker镜像合二为一
基于Alpine构建php7.0.27镜像的dockerfile