I see that there is a pact-cli docker image as wel...
# pact-broker
j
I see that there is a pact-cli docker image as well, but I'm not sure exactly how to incorporate that into my own dockerfile. My instinct is to do a multi-stage dockerfile, where I pull the pact-cli image just to copy the pact-cli script, but when I try and run
docker run -it --entrypoint bash pactfoundation/pact-cli
to browse around inside the docker container and locate the script, I get an error that says it does not have bash installed, 🤷‍♂️
m
There is no
--help
argument
It's
pact-broker help publish
I get an error that says it does not have bash installed, 🤷‍♂️
That's because bash isn't installed. Just use
sh
y
Are you running alpine? does your image have bash?
m
You can extend the dockerfile using
FROM
Multistage is not really intended for that purpose
y
I see that there is a pact-cli docker image as well, but I'm not sure exactly how to incorporate that into my own dockerfile.
ideally you would just use it as is, as a CLI tool, rather than incorporating into your Dockerfile, but as said you can use Dockerfiles extend syntax to build from an existing image.
☝️ 1
Here is an example I did a while back, based on
debian:stretch
https://github.com/YOU54F/pact-standalone-docker-slim/blob/master/debian_base/Dockerfile where I load the ruby cli into an image, might be useful. Let us know how you get on buddy