This repo contains the WordPress docker image dxw uses for local development.
The image includes a mailcatcher (to avoid unintentionally sending emails to real addresses), and WP CLI.
It is not suitable for use in production.
A separate folder is used for each PHP version supported, each containing all the relevant files required to build the image. There is a docker tag for each supported PHP version, plus a latest tag which will point to the latest supported version.
If you're building a new WordPress project, you should use dxw's WordPress Template, which uses this image in its docker-compose.yml.
When the image is built, a copy of the latest version of WordPress is downloaded.
When running the image, it will check for updates before starting Apache. However it can be configured to download other versions of WordPress via the WORDPRESS_VERSION environment variable.
Example docker-compose.yml file (the last two lines should be added - the rest are there by default):
wordpress:
image: thedxw/wpc-wordpress
ports:
- "80:80"
links:
- mysql
- mailcatcher
- beanstalk
volumes:
- .:/usr/src/app
- ./wp-content:/var/www/html/wp-content
environment:
WORDPRESS_VERSION: 4.7