Add the following in your Dockerfile to set Locale in Ubuntu
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
DevOps | Software Automation | Continuous Integration
Add the following in your Dockerfile to set Locale in Ubuntu
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
The easiest and fastest way to do this is via Dockerized Pact Broker.
By following Step 1 to Step 4 in this document, you will be able to have a Dockerized Pact Broker linking to a Dockerized PSQL in your localhost within minutes!
All you then need is to publish the JSON file generated by your consumer test via Curl command:
curl -v -XPUT -H “Content-Type: application/json” -d @<path to JSON file> <http://localhost/pacts/provider/<Provider Name>I/consumer/<Consumer Name>/version/<App Version No.>>
A few things to share with my own experience is that (if you’re using Mac)
Pact Broker will be running on http://localhost
docker-machine ip default
The command will enable the ip to be returned where you can view Pact Broker on port 80
If you do not wish yo use Dockerized PSQL, create your own database and set up the tables and users as explained. To link Pact Broker Docker to the physical database, do:
docker run –name pactbroker -e PACT_BROKER_DATABASE_USERNAME='{{user}}’ -e PACT_BROKER_DATABASE_PASSWORD='{{password}}’ -e PACT_BROKER_DATABASE_HOST='{{host}}’ -e PACT_BROKER_DATABASE_NAME='{{name}}’ -d -p 80:80 dius/pact_broker
© 2023 Chuan Chuan Law
Theme by Anders Noren — Up ↑