Skip to content

Top-level docker_build targets are broken again #28

Description

@mattmoor

In the switch to rules_docker I broke top-level docker_build targets because the name we use isn't an acceptable name to the containerregistry.client.docker_name module.

Here's the stack trace:

$ bazel build :image
INFO: Found 1 target...
ERROR: /home/mattmoor/java-docs-samples/flexible/helloworld/BUILD:16:1: null failed: Process exited with status 1 [sandboxed].
Traceback (most recent call last):
  File "/home/mattmoor/.cache/bazel/_bazel_mattmoor/d76411ba60a897ec070f41fe6c460c8f/bazel-sandbox/c3d33b99-a06b-4472-a6a8-c051f811fdf6-0/execroot/helloworld/bazel-out/host/bin/external/io_bazel_rules_docker/docker/create_image.runfiles/helloworld/../io_bazel_rules_docker/docker/create_image.py", line 198, in <module>
    main()
  File "/home/mattmoor/.cache/bazel/_bazel_mattmoor/d76411ba60a897ec070f41fe6c460c8f/bazel-sandbox/c3d33b99-a06b-4472-a6a8-c051f811fdf6-0/execroot/helloworld/bazel-out/host/bin/external/io_bazel_rules_docker/docker/create_image.runfiles/helloworld/../io_bazel_rules_docker/docker/create_image.py", line 195, in main
    args.base, args.metadata, args.name, args.repository)
  File "/home/mattmoor/.cache/bazel/_bazel_mattmoor/d76411ba60a897ec070f41fe6c460c8f/bazel-sandbox/c3d33b99-a06b-4472-a6a8-c051f811fdf6-0/execroot/helloworld/bazel-out/host/bin/external/io_bazel_rules_docker/docker/create_image.runfiles/helloworld/../io_bazel_rules_docker/docker/create_image.py", line 128, in create_image
    repository=repository, tag=name))
  File "/home/mattmoor/.cache/bazel/_bazel_mattmoor/d76411ba60a897ec070f41fe6c460c8f/bazel-sandbox/c3d33b99-a06b-4472-a6a8-c051f811fdf6-0/execroot/helloworld/bazel-out/host/bin/external/io_bazel_rules_docker/docker/create_image.runfiles/containerregistry/client/docker_name_.py", line 148, in __init__
    super(Tag, self).__init__(parts[0])
  File "/home/mattmoor/.cache/bazel/_bazel_mattmoor/d76411ba60a897ec070f41fe6c460c8f/bazel-sandbox/c3d33b99-a06b-4472-a6a8-c051f811fdf6-0/execroot/helloworld/bazel-out/host/bin/external/io_bazel_rules_docker/docker/create_image.runfiles/containerregistry/client/docker_name_.py", line 114, in __init__
    raise self._validation_exception(name)
containerregistry.client.docker_name_.BadNameException: Docker image name must be fully qualified (e.g.registry/repository:tag) saw: bazel

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions