Wordpress + Docker + Github
Working with Wordpress and Git for me has been a challenge. Ideally I want to keep just my plugins and theme in version control and keep all the Wordpress files (that I would never edit) seperate. You can accomplish this manually but how would this work if you are using Docker for local development?
Docker.. actually makes this easy and quite elegant.
With Docker you are able to leverage the Wordpress container and just have your theme and plugins
in version control. Amazing.
Below is the docker-compose file, a project template using this can be found in this
image This pulls a specific version of wordpress. Use this to match whatever you are developing against. The list of available versions can be found in the docker registry
volumes This mounts your plugin folder at the correct location within the container.
That is all!