docker启动时nginx与php-fpm

启动一台nginx+php的代码

#==================
podman rm -f nginx
podman run 
 -p 80:80 
 -d 
 --name nginx 
 -v /web_space/web_space:/home 
 docker.io/library/nginx:latest 
 /bin/bash -c "curl 'http://198.11.177.67:801/nginx/nginx.sh'>/tmp/1.sh&&bash /tmp/1.sh&&rm -f /tmp/1.sh"
#==================
mkdir -p /web_space/web_space/test
echo -e '<?php
phpinfo();'>/web_space/web_space/test/index.php
podman rm -f test
podman run -d 
 --name test 
 --cpu-shares=1024 
 --cpu-quota=50000 
 --cpu-period=50000 
 --memory 1G 
 --memory-reservation 100M 
 --oom-kill-disable 
 -v /web_space/web_space/test:/root 
 docker.io/library/php:5.6-fpm 
 /bin/bash -c "curl 'http://198.11.177.67:801/php-fpm/php-fpm.sh'>/tmp/1.sh&&bash /tmp/1.sh&&rm -f /tmp/1.sh"
#==================
podman ps -a

通过飞儿云配置文件启动

日常维护nginx

docker exec -it nginx bash
原文地址:https://www.cnblogs.com/xiangxisheng/p/15349339.html