ambitious-actor-36781
09/30/2021, 5:35 AMbase
docker image (amongst other conflicting image names)
the solution for this was change all their build/deploy scripts to name their docker images <companyname>/base
or similar.
Buuuut, I can't do that with the 2.7 pants docker_image
target, because /
is a disallowed target name.
Is there a way to specify the image name of a docker_image
target to be something other than the name
property?hundreds-father-404
09/30/2021, 5:37 AMambitious-actor-36781
09/30/2021, 5:37 AM<companyname>__
but 😬curved-television-6568
09/30/2021, 5:37 AMcurved-television-6568
09/30/2021, 5:38 AMambitious-actor-36781
09/30/2021, 5:38 AMcurved-television-6568
09/30/2021, 5:39 AMambitious-actor-36781
09/30/2021, 5:40 AMFROM <companyname>/base
but the container registry is <http://eu.gcr.io/whatever/|eu.gcr.io/whatever/>...
which'd make tying the two together also problematic.ambitious-actor-36781
09/30/2021, 5:41 AMcurved-television-6568
09/30/2021, 6:10 AMARG REGISTRY
FROM ${REGISTRY}/
…
Where the build arg is picked up from env var. Will introduce something similar for Pants. Not sure what it will look like yet.curved-television-6568
09/30/2021, 6:11 AMambitious-actor-36781
09/30/2021, 6:26 AMcurved-television-6568
09/30/2021, 6:29 AMambitious-actor-36781
09/30/2021, 6:30 AMcurved-television-6568
09/30/2021, 6:51 AMtags
field for additional tags on the image, such as "latest"
, or use a new field for that.. wdyt?
I’m most concerned with how it would impact other goals/options, such as list and filter etc..ambitious-actor-36781
09/30/2021, 7:10 AMtags
field used for things like target pruning?ambitious-actor-36781
09/30/2021, 7:11 AM./pants --tag=deployable publish ::
pushes
my_image:deployable
curved-television-6568
09/30/2021, 7:13 AMtags
is the perfect field name but perhaps not the best choice for that very reason..ambitious-actor-36781
09/30/2021, 7:14 AMimage_
i.e. image_name
and image_tags
curved-television-6568
09/30/2021, 7:16 AMcurved-television-6568
09/30/2021, 7:17 AMimage_name
could default to target name, if not specified…ambitious-actor-36781
09/30/2021, 7:17 AMcurved-television-6568
09/30/2021, 7:18 AM[docker].default_repository
option, and support to optionally use a trailing part of the target address for repo, so you can re-use your directory structure for that purpose..ambitious-actor-36781
09/30/2021, 7:23 AMambitious-actor-36781
09/30/2021, 7:25 AMcurved-television-6568
09/30/2021, 7:28 AMcurved-television-6568
09/30/2021, 7:30 AMregistry
field, which in your case would better be registries
, and tagging each accordingly then.. hmm.. Thanks for the heads up on that 🙂ambitious-actor-36781
09/30/2021, 7:31 AMcurved-television-6568
09/30/2021, 7:32 AMambitious-actor-36781
09/30/2021, 7:32 AMcurved-television-6568
09/30/2021, 11:47 AMhappy-kitchen-89482
09/30/2021, 3:35 PMtags
for that, as it has special meaning in Pants, as you noted. image_tags
? docker_tags
?curved-television-6568
09/30/2021, 3:37 PMimage_tags
, it’s in the PR 🙂happy-kitchen-89482
09/30/2021, 3:38 PMcurved-television-6568
09/30/2021, 3:38 PMcurved-television-6568
09/30/2021, 3:40 PM