Sign inSign up

ismail2ov/spring-cloud-contract-stub-runner

By ismail2ov

•Updated over 2 years ago

Spring Cloud Contract Stub Runner

Image
0

1.3K

ismail2ov/spring-cloud-contract-stub-runner repository overview

⁠Docker Spring Cloud Contract Stub Runner

This is base Docker image to run stubs created with Spring Cloud Contract⁠.

The project repository is: Docker image to run stubs created with Spring Cloud Contract⁠.

The version corresponds to the version of Spring Cloud Contract Stub Runner⁠.

⁠How to use?

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⁠.

⁠Set the Env Vars
  • STUBS_GROUP_ID - Project group Id, default value is org.example
  • STUBS_ARTIFACT_ID - Project artifact Id, default value is untitled
  • STUBS_VERSION - Artifact version, default value is 1.0-SNAPSHOT
  • STUBS_FOLDER - It is the folder in which the stubs will be copied, its value is the same as STUBS_PACKAGE replacing the points (.) with a slash (/), default value is org/example
  • STUBRUNNER_PORT - The port on which the stubs will run, default is a random port
⁠Build Docker image
$ docker build --tag my-catalog-stubs .
⁠Run Spring Cloud Contract Stub Runner
$ docker run --rm  --name my-catalog-stubs -p 8080:8080 my-catalog-stubs
⁠Check the stub runner is running
$ curl -i localhost:8080/products

Tag summary

Content type

Image

Digest

sha256:97330d768…

Size

314.8 MB

Last updated

over 2 years ago

docker pull ismail2ov/spring-cloud-contract-stub-runner:4.1.2