- Notifications
You must be signed in to change notification settings - Fork1
Minimal, secure Docker images for Wordpress
License
domsekotill/docker-wordpress
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Docker images for Wordpress.
The primary aim is to be secure and easy to deploy. Unlike other Wordpressimages the statefulness is reduced to the bare minimum; aside from therequired database only the uploaded media directory needs to be persistent,and even that can be avoided with a media cloud storage plugin1.
Two images are produced from the Dockerfile:
The primary runs a PHP server with a FastCGI (port 9000) interface(PHP-FPM), with Wordpress installed.
The second image runs Nginx with an HTTP (port 80) interface, whichserves all the static files and proxies non-static requests to thePHP-FPM server.
Typical usage requires both images be run in containers on the same host,sharing a volatile (non-persistent) volume containing the static files,mounted at/app/static. This volume is populated by the PHP-FPM containerduring its startup.
The containers share another persistent volume for user-uploaded media files(if no media cloud storage plugin is used) mounted at/app/media.
The nginx container is not intended to be publicly accessible (it onlylistens on port 80). Some form of HTTPS termination is required ata minimum.
See theconfiguration document for an explanationof the configuration files and the available options.
See theKubernetes example document to see an exampledeployment of pods running these services.
Note: Building manually requires Docker 18.09 or later with theBuildkit feature enabled.
Note:(Dec 2020) Currently WP-CLI does not support PHP-8. Likely various plugins andthemes also do not work with PHP-8. Therefore until wider support is available, supplya PHP-7 version with a build argument.
To build the PHP-FPM image run:
DOCKER_BUILDKIT=1 docker build -t wordpress:tag --build-arg php_version=7.4.13.To build the Nginx companion image, run:
DOCKER_BUILDKIT=1 docker build -t wordpress-nginx:tag --target=nginx.Footnotes
In a future release Simple Storage Service (S3) services may besupported out-of-the-box.↩
About
Minimal, secure Docker images for Wordpress
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.