pactfoundation/pact-mock-service

Sponsored OSS

By Pact Foundation

Updated almost 8 years ago

Docker image running the Pact mock service

Image
1

100K+

pactfoundation/pact-mock-service repository overview

Pact Mock Service Docker

Docker image running the pact mock service. You can pull the latest image from Dockerhub.

Usage

$ docker-compose up

Test that mock service is running

$ DOCKER_CONTAINER_IP=$(docker-machine ip default) # or localhost if using Docker native
$ curl -H "X-Pact-Mock-Service: true" http://${DOCKER_CONTAINER_IP}

Get pact contents

$ curl  -X POST \
        -H "X-Pact-Mock-Service: true" \
        -H "Content-Type: application/json" -d '{"consumer" : {"name": "Consumer Name"}, "provider": {"name": "Provider Name"}}' \
        http://${DOCKER_CONTAINER_IP}/pact

For examples of the other commands, see this script

Tag summary

Content type

Image

Digest

Size

23.8 MB

Last updated

almost 8 years ago

docker pull pactfoundation/pact-mock-service

This week's pulls

Pulls:

3

Nov 27 to Dec 3