Automate docker for running test script

I have three docker files with entry point bash files for each image. Each docker file is for different purpose like:

  1. Dockerfile 1: – This file is to create the image and run the container which pulls my project repository and make it available to my host directory.

  2. Dockerfile 2: – This file is to create the image and run the container which creates a jar file from my existing project code and make it available to my host directory.

  3. Dockerfile 3: – This file is to create the image and run the container which uses created jar file and runs the test cases.

Now I want to automate this whole process using docker-compose or any other available options with docker. Can anyone guide me how to automate this all three separate process so that i can easily automate the process from pulling project code to running my test cases using jar file created in between. Can i get any article related to it or Docker-compose example files.

Source: Docker Questions