Public | Automated Build

Last pushed: 5 days ago
Short Description
Adds developer tools to the official Wordpress image.
Full Description

Wordpress Development

Based off the latest official Wordpress ,
this Dockerfile just adds a few additional libraries for facilitating Wordpress
theme and plugin development:

Getting Started

Like the official Wordpress image, you can start a new docker container like
this (assuming you have a mysql container running named project-mysql):

docker run --link project-mysql:mysql -n project dvhtn/wordpress-dev:latest

An example Docker Compose configuration,
docker-compose.yml is included to help get you up and running with a full
stack (ie. wordpress and mysql). Simply copy it into your project's directory
and run:

docker-compose up

Note: in my case, due to docker permissions, the first time this is run can
often fail. Simply restarting the docker containers a couple of times seems to
resolve this.

This will, by default, start Wordpress on port 8000 and MySQL on port 8306
on your Docker host, so you can visit (replace that
IP with your Docker host's IP) to complete the installation.

Now with the container running, you can easily execute wp-cli commands. For
example, if you wanted to install WP Test for testing out
your theme:

docker-compose exec --user www-data wordpress /bin/bash
wp plugin install wordpress-importer --activate
curl -OL
wp import wptest.xml --authors=create
Docker Pull Command
Source Repository

Comments (0)