wordpress

virtuman/wordpress Docker Image

自动构建

一个高度可配置的Nginx+PHP+Exim Web服务器栈,集成ngx_pagespeed、NewRelic监控、xdebug调试工具和邮件服务,支持生产/开发环境切换,适用于Web应用部署。

下载次数: 0状态:自动构建维护者:virtuman仓库类型:镜像最近更新:
下载命令
点击查看

Nginx + PHP + Exim

Highly configurable nginx-PHP webserver stack built on https://hub.docker.com/r/funkygibbon/nginx-pagespeed/, which is in turn built on a https://hub.docker.com/r/funkygibbon/ubuntu/

Docker Hub: https://hub.docker.com/r/funkygibbon/nginx-php-exim/


docker run -p "80:80" -p "443:443" -e "APP_HOSTNAME=some.example.com" -v /some/dir/www:/app/www funkygibbon/nginx-php-exim


Included in this image:

  • https://github.com/pagespeed/ngx_pagespeed
  • https://newrelic.com
  • exim4, ready for smarthost delivery to sendgrid or mailgun
  • fully functional cron daemon
  • https://xdebug.org/ with configurable remote host/port/key
  • Production / development environments. All outgoing email is redirected to a configurable destination ($ADMIN_EMAIL)in development
  • Sane security defaults, and SSL confugration based on Mozilla's intermediate profile. See: https://hub.docker.com/r/funkygibbon/nginx-pagespeed/ for details

This container is configurable via a plethora of environment variables, which are applied on service start so you can generally reconfigure any aspect of the stack by executing docker exec foo_bar_1 sv restart php|nginx

vardefaultdescription
APP_ENVproductionproduction, development :: 'development' enables http://www.xdebug.org/
ADMIN_EMAIL***Server administrator email, used for intercepted email in development mode
CHOWN_APP_DIRtrueif true, chown -R $APP_USER:$APP_GROUP /app/www
APP_HOSTNAMEhostname -fhostname of application
VIRTUAL_HOSTexample.comvirtualhosts which this service should respond to, separated by commmas. Useful for operating behind https://hub.docker.com/r/jwilder/nginx-proxy/.
CONTAINER_TIMEZONEAustralia/SydneyServer timezone
APP_USERappnginx and php5-fpm user
APP_GROUPappnginx and php5-fpm group
APP_UID1000user_id - useful when mounting volumes from host > guest to either share or delineate file access permission
APP_GID1000group_id
UPLOAD_MAX_SIZE30MMaximum upload size, applied to nginx and php5-fpm
NGINX_MAX_WORKER_PROCESSES8nginx worker_processes is determined from number of processor cores on service start, up to the maximum permitted by NGINX_MAX_WORKER_PROCESSES
PHP_MEMORY_LIMIT128MMaximum memory PHP can use per worker
PHP_PROCESS_MANAGERdynamicdynamic, static, ondemand :: PHP process manager scheme
PHP_MAX_CHILDREN6process manager maximum spawned children
PHP_START_SERVERS3if PHP_PROCESS_MANAGER is dynamic, this is the number of children spawned on boot
PHP_MIN_SPARE_SERVERS2if PHP_PROCESS_MANAGER is dynamic, this is the minimum number of idle children
PHP_MAX_SPARE_SERVERS3if PHP_PROCESS_MANAGER is dynamic, this is the maximum number of idle children
PHP_MAX_REQUESTS500Maximum number of requests each child process can process before terminating, which should mitigate any memory leaks. Set to 0 to disable.
PHP_DISABLE_FUNCTIONSfalseComma separated list of additional functions to disable for security. These are appended to the default Ubuntu distribution disable_functions line
PHP_XDEBUG_REMOTE_HOST172.17.42.1If $APP_ENV is development, XDebug is enabled and configured to communicate to this remote host
PHP_XDEBUG_REMOTE_PORT9000XDebug port
PHP_XDEBUG_IDE_KEYdefault_ide_keyXDebug IDE Key
EXIM_DELIVERY_MODElocalsmarthost, local :: set to smarthost to enable third party SMTP
EXIM_MAIL_FROMexample.comdomain from which exim4 mail appears to originate
EXIM_SMARTHOSTsmtp.example.org::587smarthost relay SMTP server address and port (note the double colon (::) before port number)
EXIM_SMARTHOST_AUTH_USERNAME***SMTP username
EXIM_SMARTHOST_AUTH_PASSWORDpassword_123SMTP password
NEWRELIC_ENABLEDtrueEnables or disables https://newrelic.com/ reporting
NEWRELIC_APPNAME$PHP_POOL_NAMEApplication name in Newrelic APM list. Defaults to PHP pool name (APP_HOSTNAME with underscores instead of periods)
NEWRELIC_LICENSE__DISABLED__Newrelic account license key. Available from your Newrelic account page

See also configuration options from upstream images:

  • https://hub.docker.com/r/funkygibbon/nginx-pagespeed/
  • https://hub.docker.com/r/funkygibbon/ubuntu/

Philosophy

I understand a degree of pushback against the idea of bundling so much into one container, at first glance it seems 'against the Docker microservice philosophy'.

However, in my experience, so much is gained by bundling these items together - nginx and php have similar configuration options which require tweaking synchronously - think nginx UPLOAD_MAX_SIZE, php UPLOAD_MAX_FILESIZE and POST_MAX_SIZE, file and socket permissions, performance improvement in communication over socket vs tcp.

I am prepared to be convinced that this is totally utterly wrong-headed, and may *** breaking this PHP installation out to separate nginx/PHP containers if there's a need, but for now, it just works for me.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 wordpress 镜像标签

docker pull docker.xuanyuan.run/virtuman/wordpress:<标签>

DockerHub 原生拉取命令

docker pull virtuman/wordpress:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告