I have a couple of WordPress sites that I wanted to create local development environments in docker for, here are some tips on how to get it to work.
I use the official MySQL and WordPress docker images. The directory structure is as follows:
dev-env.sh:
update-development-site.sh:
production_dump.sql
is a MySQL dump of the production database, add a “use wordpress-site;” statement in the beginning so that the backup is imported into the correct database.