This Docker image adds LDAP and Memcached PHP Extension to official Wordpress fpm image for WordPress plugins.
5.1.1-fpm
, latest
4.9.1-fpm
4.8.3-fpm
4.8.0-fpm
4.7.3-fpm
- Add wp-cli running php7.1-cli official image based on debian
- Enable WP-CACHE in wp-config.php
- Build & Validate using Travis CI and Jenkins CI
- Add WP-FFPC plugin for object caching to Memcached
- Add Simple-Ldap-Login plugin for LDAP/AD authentication
- Enable HTTP/2 support in Nginx
Note: The
cli
container will be flapping until the Wordpress site configured.
version: '2'
volumes:
wordpress-db:
wordpress-data:
services:
mariadb:
image: amd64/mariadb:10.2
environment:
MYSQL_DATABASE: wordpress
MYSQL_PASSWORD: Chang3M3
MYSQL_ROOT_PASSWORD: Change3M34ls0
MYSQL_USER: wordpress
volumes:
- wordpress-db:/var/lib/mysql
memcached:
image: amd64/memcached:1.5
nginx:
build: nginx/
image: fjudith/wordpress:nginx
ports:
- 32716:443/tcp
- 32715:80/tcp
links:
- memcached:memcached
- wordpress:wordpress
volumes:
- wordpress-data:/var/www/html:rw
wordpress:
build: php7-fpm/
image: fjudith/wordpress:php7-fpm
environment:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: Chang3M3
links:
- memcached:memcached
- mariadb:mysql
volumes:
- wordpress-data:/var/www/html
cli:
build: cli/
image: fjudith/wordpress:cli
stdin_open: true
tty: true
depends_on:
- mariadb
- wordpress
links:
- mariadb:mysql
volumes:
- wordpress-data:/var/www/html
Once the initial site configuration performed, navigate to Plugins
, activate WP-FFPC
and click Settings
.
Set the following minimal configuration options:
- Cache Type/Select Backend: PHP Memcached
- Backend Settings/Hosts: memcached:11211
- Backend Settings/Authentication: username: Empty
- Backend Settings/Authentication: password: Empty
- Backend Settings/Enable memcached binary mode: Activated
Because the docker-compose
levegare persistent volume in the Wordpress root directory, its required to open a session in the cli
container in order to run the command wp core update
.
Open a terminal session in the cli
container.
WP_CLI=$(docker ps -qa -f ancestor=fjudith/wordpress:cli)
docker container exec -it ${WP_CLI} bash
Run the following commands to update the application engine, the plugins and themes.
wp core update
wp plugins update --all
wp theme update --all
Run the following commands
WP_CLI=$(docker ps -qa -f ancestor=fjudith/wordpress:cli)
docker container exec ${WP_CLI} bash -c 'wp core update && wp plugins update --all && wp theme update --all'
https://wooster.checkmy.ws/2015/10/wordpress-docker/ https://ejosh.co/de/2015/08/wordpress-and-docker-the-correct-way/ docker-library/php#132 https://developer.wordpress.org/cli/commands/