Andre Rodrigues
02/13/2023, 10:15 PMdocker run pactfoundation/pact-cli:latest publish C:\pacts\consumer-provider.json --consumer-app-version 0.0.1 --broker-base-url <http://localhost:9292/>
However, the pact throws this error:
Specified pact file 'C:/pacts/consumer-provider.json' does not exist. This sometimes indicates one of the arguments has been specified with the wrong name and has been incorrectly identified as a file path.
The file exists and is properly stored in this folder in my windows.
Anyone can help me on that? Thanks a lot!Andre Rodrigues
02/14/2023, 2:34 PMYousaf Nabi (pactflow.io)
Andre Rodrigues
02/14/2023, 4:41 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
-v command being using to mount the working directory, into the container.
The files are $PWD/example/pacts are being used to publish, assume you are running the docker command from the root of this repo
https://github.com/pact-foundation/pact-ruby-cli
so you would volume mount to pact directory, or file into the container with regular docker syntax, and then provide the path (to the file in the container) not on your root filesystemYousaf Nabi (pactflow.io)
Andre Rodrigues
02/14/2023, 4:46 PMYousaf Nabi (pactflow.io)
Andre Rodrigues
02/14/2023, 4:49 PMAndre Rodrigues
02/14/2023, 8:35 PMdocker run --network="host" --rm -it -v ${PWD}/pacts:/example/pacts pactfoundation/pact-cli:latest publish /example/pacts --consumer-app-version 0.0.1 --broker-base-url <http://localhost:9292>Andre Rodrigues
02/14/2023, 8:35 PMBeth (pactflow.io/Pact Broker/pact-ruby)
"Specified pact file '#{path}' does not exist. This sometimes indicates one of the arguments has been specified with the wrong name and has been incorrectly identified as a file path. If you are using Docker, check that you have mounted the pact file or directory into the container correctly using `-v`, and have specified the location of the pact file or directory in the *Docker container*, not the *host*."Beth (pactflow.io/Pact Broker/pact-ruby)
Andre Rodrigues
02/15/2023, 8:37 PMYousaf Nabi (pactflow.io)