Using Compose is basically a three-step process.
- Define your app's environment with a Dockerfile so it can be reproduced anywhere.
- Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment.
- Lastly, run docker-compose up and Compose will start and run your entire app.
-
Create docker-compose.yml
-
Run docker-compose up -d
Something wrong then clean up...
- docker stop phpmyadmin database wordpress; docker-compose rm -v
- docker volume rm wordpress_wordpress-db-data wordpress_wordpress-data-uploads
Troubleshoting
- docker logs wordpress