In this Docker WordPress tutorial, we’ll learn how to setup a WordPress environment in Docker.
When setting up a WordPress development environment in Docker, there’s a couple things you have to pay attention to. That said, it’s pretty simple. You put the WordPress theme and plugin code in their own dedicated folders on your local machine, and mount them into the proper location in the Docker container.
Also, because Docker creates and destroys containers when using docker-compose, you want to setup your WordPress config file (wp-config.php) and have it on your local machine, and use a Dockerfile to mount it to the proper location.