docker镜像构建nginx+php+supervisor
php php-opcache php-cli php-devel php-pdo php-pgsql php-sqlite3 php-gd php-curl php-memcached php-imap php-mysqlnd php-mysql php-mbstring php-xml php-zip php-bcmath php-soap php-intl php-readline php-pcov php-msgpack php-igbinary php-ldap php-redis php-pear php-dom php-mcrypt php-odbc php-mssql php-mysqli php-pecl-swoole php-pecl-yaf php-pecl-redis php-fpm Phalcon
/data/supervisor/tmp ( supervisord.log supervisor.sock supervisord.pid ) # supervisor进程相关目录 /data/supervisor/logs # supervisor日志目录 /data/supervisor/conf.d/nginx-php.conf /data/nginx/conf.d/site.conf /data/nginx/log #nginx日志目录 /data/php-fpm/logs #php-fpm日志目录 /data/www 站点根目录
[program: nginx]
command=/usr/sbin/nginx -g 'daemon off;'
autorestart=true ; autostart=true ;
stderr_logfile=/data/supervisor/logs/nginx.error.log ;
stdout_logfile=/data/supervisor/logs/nginx.stdout.log ;
user=root ;
stopsignal=INT startsecs=10 ;
startretries=5 ;
stopasgroup=true
[program: php-fpm]
command=bash -c "sleep 1 && /usr/sbin/php-fpm --fpm-config /etc/php-fpm.conf --pid /data/php-fpm/php-fpm.pid" process_name=%(program_name)s ;
autorestart=true ;
autostart=true ;
stderr_logfile=/data/supervisor/logs/php.error.log ;
stdout_logfile=/data/supervisor/logs/php.stdout.log ;
user=root ;
stopsignal=INT startsecs=10 ;
startretries=5 ;
stopasgroup=true
server { listen 80; #server_name localhost; root /data/www;
location / {
#root public;
index index.php index.html index.htm;
#try_files $uri $uri/ /index.php?$query_string; #美化URL
}
location ~ \.php$ {
#root html;
fastcgi_pass unix:/data/php-fpm/php-fpm.sock;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /data/www$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
#error_page 404 /404.html;
# location = /40x.html {
#}
#error_page 500 502 503 504 /50x.html;
# location = /50x.html {
#}
}
docker build -t 用户名/镜像名:版本号 .
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。