Skip to content

Instantly share code, notes, and snippets.

@pfichtner
Last active April 10, 2025 08:33
Show Gist options
  • Select an option

  • Save pfichtner/bd37415fdf92bf8ca86cc12b77a5c760 to your computer and use it in GitHub Desktop.

Select an option

Save pfichtner/bd37415fdf92bf8ca86cc12b77a5c760 to your computer and use it in GitHub Desktop.
Run a pact server providing the interactions from a pact file
docker run \
--rm \
--network=host \
-it \
-v $PWD/pacts/:/pacts \
pactfoundation/pact-cli:latest \
stub-service --port=8080 '/pacts/*'
# -p 8080:8080 instead of --network=host did not work
# to query it
curl --header "Accept: application/json" \
http://localhost:8080/the/query/you-did-before
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment