Is it possible to choose a docker registry from cl...
# general
i
Is it possible to choose a docker registry from cli? We have separate prod and non-prod registries, and the CI pipeline will build images for one or the other depending on tags/branches/etc… Perhaps separate config.ci.prod.toml and config.ci.non-prod.toml with different default registries would be simplest?
h
Hey Marko 🙂 Any option in Pants can be set via CLI, env var, or pants.toml: https://www.pantsbuild.org/v2.10/docs/options
👍 1
i
Thanks! These both worked exactly as i wanted:
./pants --docker-registries="{'registry': {'address':'<http://prod.com|prod.com>','default':'true'}}" package src/docker:hello
PANTS_DOCKER_REGISTRIES="{'registry': {'address':'<http://prod.com|prod.com>','default':'true'}}" ./pants package src/docker:hello
🙌 1