https://pantsbuild.org/ logo
i

icy-hair-30586

03/03/2022, 8:37 PM
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

hundreds-father-404

03/03/2022, 8:41 PM
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

icy-hair-30586

03/03/2022, 9:09 PM
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
5 Views