Good day, channel. Is it true that <https://www.pa...
# general
l
Good day, channel. Is it true that https://www.pantsbuild.org/2.23/reference/targets/docker_image#registries doesn't accept any variables and you can provide only static strings defined in your pants.toml?
👀 1
My goal is to have 2 definitions of the [docker.registries] and switch them depending on the build_args.REGISTRY value
Here https://github.com/pantsbuild/pants/blob/main/docs/docs/docker/tagging-docker-images.mdx#string-interpolation-using-placeholder-values it says that "The interpolation context (the available placeholder values) depends on which field it is used in. These are the common values available for all fields:"
But looks like when i'm trying to configure it like this:
Copy code
docker_image(
        dependencies=[":binary"],
        image_tags=["{build_args.GITHUB_SHA}", "{build_args.BUILD_VERSION}"],
        name=app_name,
        registries=["{build_args.REGISTRY}"],
    )
I always get:
Copy code
14:28:04.65 [INFO] Completed: Building docker image {build_args.REGISTRY}/docker:local +1 additional tag.                                                                                                                   
14:28:04.65 [ERROR] 1 Exception encountered:                                                                                                                                                                                
                                                                                                                                                                                                                            
Engine traceback:                                                                                                                                                                                                           
  in `publish` goal                                                                                                                                                                                                         
                                                                                                                                                                                                                            
ProcessExecutionFailure: Process 'Building docker image {build_args.REGISTRY}/docker:local +1 additional tag.' failed with exit code 1.                                                                                     
stdout:                                                                                                                                                                                                                     
                                                                                                                                                                                                                            
stderr:                                                                                                                                                                                                                     
ERROR: invalid tag "{build_args.REGISTRY}/docker:local": invalid reference format