https://pantsbuild.org/ logo
f

few-arm-93065

12/15/2021, 8:53 PM
Hi all, quick question about the docker_image target. if there is a way to substitute a common prefix in "registries"? All our AWS ECRs start with the same string - ###.dkr.ecs.us-east-1.amazonaws.com/ - with a different suffix for each image. I'd like to do something like this: registries=["${ECR_PREFIX}/myimage"] Any ideas how that might be accomplished? Similarly, is it possible to add a hook to authenticate against ECR before attempting to push the image? Thanks!
👋 1
c

curved-television-6568

12/15/2021, 9:22 PM
I think it is the
repository
(and/or
default_repository
) options you want to use for the
myimage/…
part.
so the
registry
ends at the
.com
then you can have
default_repository="{directory}/{name}"
or something like that… or
default_repository="{name}/{build_args.SOME_ARG}"
etc… the possibilities with repository is great.
f

few-arm-93065

12/16/2021, 7:36 PM
Thanks Andreas!
4 Views