WordPress themes and plugins development using Docker and Compose.
git clone --recursive https://github.com/gedex/wpdock.git
cd wpdock
docker-compose build
docker-compose up -d
Now open http://[docker-ip]/
. If you're using boot2docker,
then replace [docker-ip]
with your boot2docker IP, check it with:
boot2docker ip
Run the famous WP setup from there.
docker-compose run wpcli --help
docker-compose run wpcli theme install twentyfifteen --activate
docker-compose run wpcli plugin install woocommerce --activate
Since WP installed as submodule, you can checkout different version of WP:
cd www/wp
git checkout 3.9
git checkout 4.2.2
git checkout master
To stop services:
docker-compose stop
Your changes are persisted. So when you do docker-compose up -d
again you'll get the same
snapshot as before.
When you want to kill all the containers:
docker-compose kill
docker-compose kill
docker rm $(docker ps -a -q) # Warning: this will remove all containers
If you start again, you'll be prompted with WP install again.
These services are provided in case you're developing plugins that interact with them.
- Memcached
- Redis
- Elasticsearch
See docker-compose.yml file for service settings.
MIT License -- see LICENSE file.