This is a repository with examples of how to use Docker images to run stubs created with Spring Cloud Contract.
The base image is created in project Docker image to run stubs created with Spring Cloud Contract.
You can use the Dockerfile in the docker-images folder as a base.
For this example we will use the stubs created with the project contract-testing-demo.
STUBS_GROUP_ID- Project group Id, default value isorg.exampleSTUBS_ARTIFACT_ID- Project artifact Id, default value isuntitledSTUBS_VERSION- Artifact version, default value is1.0-SNAPSHOTSTUBS_FOLDER- It is the folder in which the stubs will be copied, its value is the same asSTUBS_PACKAGEreplacing the points (.) with a slash (/), default value isorg/exampleSTUBRUNNER_PORT- The port on which the stubs will run, default is a random port
$ docker build --tag my-catalog-stubs .$ docker run --rm --name my-catalog-stubs -p 8080:8080 my-catalog-stubs$ curl -i localhost:8080/products