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:
1 | version: "2.0" |
Then execute in the directory where the file is located:
1 | 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:
1 | version: "2.0" |