Download the executable from the official site and place it in the
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Grant the execution permission.
sudo chmod +x /usr/local/bin/docker-compose
Prepare dockerfile for test. e.g. pytest.Dockerfile
wait-for-it.shif the service is not ready immediately.
- Reference: Control startup and shutdown order in Compose
Example docker compose config yaml (TODO)
Build the related image first.
- Run the testing service.
- Remember to shut down all the services once finished.
- To check if there is any service from docker compose