启动一台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\nphpinfo();'>/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
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:docker启动时nginx与php-fpm - Python技术站