Any pointers on having support publishing docker i...
# general
a
Any pointers on having support publishing docker images to two different aws ecr's and having the authentication work properly. Ideally, I would like the BUILD to dictate where to publish (to dev and prod, or just dev).
e
Does two separate pants.toml +
PANTS_CONFIG_FILES=this.one ./pants publish ...
work? I.E. The recommended general CI trick?
a
I didn't want to have to trigger the publishes separately, while also then having to run a filter to determine the registry set on each
Some of the images to get published need to get published to both dev and prod while others will only get published to the dev registry
e
a
Yes, so we have two registries in our toml file, one named prod and one named dev. Then, we reference those in the docker image.
b
Is the issue you can't do something like
docker_image(..., registries = ["@dev", "@prod"], ...)
directly because publishing to dev needs a separate login to publishing to prod?
a
Yes, Huon that is the issue I am trying to solve for.
b
Do you know if there's
docker
/ AWS commands that allow this outside of pants? (as in, is this a pants issue or is it deeper?)
a
It looks like there is some hacks to get it to work. That was why I was wondering if anyone had any success with that.
e
Not knowing anything about this, this example seems to imply Docker knows about mapping certain registries to certain auth providers: https://www.pantsbuild.org/docs/docker#docker-authentication
Copy code
{
  "credHelpers": {
    "europe-north1-docker.pkg.dev": "gcloud"
  }
}