https://pantsbuild.org/ logo
#general
Title
# general
f

few-arm-93065

01/07/2022, 7:29 PM
Hi @curved-television-6568, is there currently a way to set up a docker registry in my pants.toml with default=true, but specify that the registry should not be published to?
c

curved-television-6568

01/07/2022, 7:31 PM
Ack, no. Publish operates on all built images.. Please post feature request on GitHub, should be easy enough to have registries with a “publish=false”, or how you feel it would best serve you.. (if per target, perhaps as a field option..?)
And/Or, should this be on a per tag basis..?
f

few-arm-93065

01/07/2022, 7:33 PM
That would be great, thanks. I will post a request. My use case is that I am introducing a runtime dependency on a docker container into my python test target, and I want the name of the docker image in my source code to reference something like "local/myimage:dev" - so I am setting up a default repo named "local", and adding a "dev" tag to the image, but I don't want pants to try and publish that.
Yes it would be cleaner, but not required, to be able to force the "dev" tag to not be published as well so it doesn't show up in my remote repo.
c

curved-television-6568

01/07/2022, 7:36 PM
Great 👍🏽
f

few-arm-93065

01/07/2022, 7:49 PM
c

curved-television-6568

01/08/2022, 12:28 AM
@few-arm-93065 it just occurred to me that there’s a
skip_push
that might work for you? https://www.pantsbuild.org/v2.9/docs/reference-docker_image#codeskip_pushcode
f

few-arm-93065

01/10/2022, 5:58 PM
Thank you, that is the workaround I've been using - but it requires a second, duplicated docker_image target. I'll comment on the issue too, but it's a little clunky, not very DRY.
c

curved-television-6568

01/10/2022, 6:05 PM
Ah, ok. Good
I'll work on a proposed fix for that, then :)