diff options
author | Linuxer Wang <linuxerwang@gmail.com> | 2017-04-20 17:54:21 +0200 |
---|---|---|
committer | Vladimir Moskva <vladmos@google.com> | 2017-04-24 16:48:42 +0200 |
commit | 40f0a626171f03380886c899b41a098cb5f2802a (patch) | |
tree | 22694444ea8ee8a8e462954ff7e46306c0ef6bd5 /tools | |
parent | 3ead6bbefb9f248d712e5ef65ff3cefb920f5ddb (diff) |
Support top level package for docker image.
Fixes #616.
Closes #2807.
PiperOrigin-RevId: 153714590
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build_defs/docker/build.bzl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/build_defs/docker/build.bzl b/tools/build_defs/docker/build.bzl index c969ac162b..719d5a60b3 100644 --- a/tools/build_defs/docker/build.bzl +++ b/tools/build_defs/docker/build.bzl @@ -222,10 +222,10 @@ def _repository_name(ctx): """Compute the repository name for the current rule.""" if ctx.attr.legacy_repository_naming: # Legacy behavior, off by default. - return "%s/%s" % (ctx.attr.repository, ctx.label.package.replace("/", "_")) + return _join_path(ctx.attr.repository, ctx.label.package.replace("/", "_")) # Newer Docker clients support multi-level names, which are a part of # the v2 registry specification. - return "%s/%s" % (ctx.attr.repository, ctx.label.package) + return _join_path(ctx.attr.repository, ctx.label.package) def _create_image(ctx, layers, identifier, config, name, metadata, tags): |