pact-foundation / pact-ruby-cli

Amalgamated Pact Ruby CLI
https://pact.io
MIT License
12 stars 15 forks source link

feat: add plugin cli to docker image #86

Closed rholshausen closed 1 year ago

rholshausen commented 1 year ago

This adds the plugin CLI into the docker image.

However, I don't think this is useful. By default, it will install any plugin into the container, which is not what anyone would want. Users will need to mount the plugin installation directory and then set an environment variable just to get it to work. And it will then only install the Linux version of the plugins.

mefellows commented 1 year ago

However, I don't think this is useful. By default, it will install any plugin into the container, which is not what anyone would want. Users will need to mount the plugin installation directory and then set an environment variable just to get it to work. And it will then only install the Linux version of the plugins.

Ah, but you're forgetting about the next feature request "how can I run the plugin inside docker?" :trollface:.

So yes, this doesn't exactly feel useful.

The more and more we do this, the more I'm seeing the value in replacing our Ruby CLI with a cross-compilable one (e.g. Rust) that can be easily installed across most OS/Arch combinations, and downloaded via the common curl getpact.sh | bash type thing.

Is there any value in merging this? For example, if flags could be passed to the plugin CLI (in a future change) to override the OS/Arch would that make this useful?

bethesque commented 1 year ago

I think we don't add it until someone asks for it.

mefellows commented 1 year ago

I think we close it for now. The only way I think we could make it work is:

  1. Add some additional flags to override the OS/arch detection (otherwise it will default to the same as the Docker image)
  2. Advise people to mount the ~/.pact directory (or again, provide a flag to specify another mapped volume mount)