WordPress Docker For Core Contributors
GPL-3.0 License
Welcome!
If you want to contribute to WP core, first give a look at the handbooks.
With this you'll have:
watch
running) in c_wpsvn_nodejs containerThis is a work in progress, but it's pretty much usable.
Install Docker
Install Docker-compose
docker-compose up
or with docker-compose up -d
for detached mode. At the first time it can take a while, because docker will build two images, checkout svn repo and set everything up. Be patient and enjoy the log craziness.wordpress-svn
with WP code. DB credentials are automatically inserted in src/wp-config.php
, so you don't need to worry about it.http://localhost/src
Ctrl+C
(if you've started it with docker-compose up
) and/or run docker-compose down
General steps for contributing to core are:
Always run this before start working:
docker exec c_wpsvn svn up
wpsvn image will run this update everytime a container is created, but you can end up with an older version of WP files if you keep things running for some time without a refresh.
Run docker exec -it c_wpsvn_nodejs grunt patch:TICKET_NUMBER
Run docker exec c_wpsvn wp --version
Run docker exec c_wpsvn svn diff > TICKET_NUMBER.diff
If you get stuck with a ERROR: for c_wpsvn_db Cannot create container for service db: Conflict. The container name "/c_wpsvn_db" is already in use by container
try running docker rm -f $(docker ps -a -q)
Any feedback is welcome! Feel free to open an issue, send a PR or contact me at wp community slack.