Docker
Often times, you'll want to use Docker to run Pact. For example, a common approach is to run all CI builds within a docker container. This guide offers some assistance in those wanting to persue this path.
Docker Images
Images from the "pactfoundation"
repository can be considered official:
- CLI Tools: https://hub.docker.com/r/pactfoundation/pact-cli (includes the Ruby implementation of the mock service, a language agnostic provider verifier, and the Pact Broker client tools.)
- Pact Broker: https://hub.docker.com/r/pactfoundation/pact-broker/
- Stub Server: https://hub.docker.com/r/pactfoundation/pact-stub-server
Alpine Linux
Many teams choose to use Alpine Linux due to its tiny footprint, and smaller security surface area.
For Pact implementations that leverage the underlying Ruby binary for their implementation, you'll need to ensure the following dependencies are met:
- Bash (it's not enough to have Ash)
- Standard CAs for TLS network communication
- glibc
NOTE: You do not need to install Ruby (unless of course your code is a Ruby app). The distribution takes care of this for you.
Reference Image
Here is an example NodeJS container that can be used as a reference to create a working container for your example: