Skip to content

felipeelia/wp-docker-core-contributor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Docker For Core Contributors

Welcome!

If you want to contribute to WP core, first give a look at the handbooks.

With this you'll have:

  1. apache, svn and wp-cli available at c_wpsvn container
  2. nodejs and grunt (with watch running) in c_wpsvn_nodejs container

This is a work in progress, but it's pretty much usable.

Initial Requirements

Starting

  1. Fork this repository, clone it or just download a zip.
  2. Go to directory
  3. Start docker-compose with 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.
  4. After building process you'll have a subdirectory called wordpress-svn with WP code. DB credentials are automatically inserted in src/wp-config.php, so you don't need to worry about it.
  5. Access http://localhost/src
  6. To shut it down you can press Ctrl+C (if you've started it with docker-compose up) and/or run docker-compose down

Using it

General steps for contributing to core are:

  1. Pick a ticket at WordPress Trac
  2. Make a patch that solves the problem
  3. Upload it at ticket's attachments section

Updating code, i.e., getting updates from svn server

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.

Getting and applying patches from a ticket

Run docker exec -it c_wpsvn_nodejs grunt patch:TICKET_NUMBER

Using wp-cli

Run docker exec c_wpsvn wp --version

Generating a patch

Run docker exec c_wpsvn svn diff > TICKET_NUMBER.diff

Troubleshooting

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)

Feedbacks

Any feedback is welcome! Feel free to open an issue, send a PR or contact me at wp community slack.

About

WordPress Docker For Core Contributors

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published