Currently we start components from docker-compose.yml file. In local we bring up always latest image for testing.
my sample docker-compose.yml file:
name: test. #Project name
services:
component1:
image: quay.io/testrd/com-test-component1:latest
ports:
- 8181:8080
environment:
- DB_HOST=localhost
- DB_PORT=3306
component2:
image: quay.io/testrd/com-test-component2:latest
ports:
- 8282:8080
environment:
- DB_HOST=localhost
- DB_PORT=3306
my requirement is to build these components before starting them. I have a gradle build target in each component "gradlew buildDocker", need to call this target.
I see there is a 'build' property in docker-compose, but do not know how to apply it for my requirement, i could not find many examples for it.
Each component located in different folders.