Hi <@U01PZK60W2F>, is there currently a way to set...
# general
f
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
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
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
Great 👍🏽
f
c
@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
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
Ah, ok. Good
I'll work on a proposed fix for that, then :)