container_image may produce invalid tags with recent changes to allowed characters in Bazel labels
As of https://github.com/bazelbuild/bazel/commit/1615da781db78b7a910daf89720189c2b2e73dbe (and I believe an earlier change allowing almost all non-control ASCII characters), a package name may not be a valid Docker image tag.
I believe this stems from https://github.com/bazelbuild/rules_docker/blob/master/container/image.bzl#L367 -- are we comfortable replacing any forbidden characters with _ or similar? This does mean distinct Bazel targets could have the same image tag, but I am not sure this edge case would be a common occurrence.
thanks for pointing this out, and thanks for the suggestion, this definitely needs to be something we change with care to not create unreasonable burden on devs to figure out how their package names are converted to docker image tags. We'll come up with some alternatives and post here for comments/feedback soon.
Related: https://github.com/bazelbuild/rules_docker/blob/master/contrib/test.bzl#L124