pants icon indicating copy to clipboard operation
pants copied to clipboard

Allow customization of registry when running a docker image

Open thejcannon opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. When I ./pants run myservice:img it uses the registry name as part of the docker tag, which is annoyingly long :see_no_evil:

E.g. 123456789987654321.dkr.ecr.us-west-1.amazonaws.com/myservice:latest is now on my list of docker images.

Describe the solution you'd like Allow me to customize the registry when just running my image. E.g.

docker_image(
    registries=[...],  # for package and publish
    run_goal_registry="companyname",
)

which then ./pants run myservice:img would make companyname/myservice:latest

Describe alternatives you've considered I have this in a plugin, but I don't like turning off the standard plugins. https://github.com/pantsbuild/pants/issues/15359 could help the pain though...

Additional context N/A

thejcannon avatar Jul 29 '22 16:07 thejcannon