This article briefly demonstrates how to use Docker-Compose to build a wordpress environment.
Create docker-compose file
First, let’s create a new one file - named: wordpress-compose.yml, the content is as follows:
Then execute in the directory where the file is located:
docker-compose -f wordpress-compose.yml up -d
In Apple M1
Mainly because the official MySQL mirror of docker does not have an arm64 version, it is enough to switch to MySQL’s own mirror. The modified compose file is as follows: