summaryrefslogtreecommitdiffhomepage
path: root/images/defs.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'images/defs.bzl')
-rw-r--r--images/defs.bzl31
1 files changed, 0 insertions, 31 deletions
diff --git a/images/defs.bzl b/images/defs.bzl
deleted file mode 100644
index 61d7bbf73..000000000
--- a/images/defs.bzl
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Helpers for Docker image generation."""
-
-def _docker_image_impl(ctx):
- importer = ctx.actions.declare_file(ctx.label.name)
- importer_content = [
- "#!/bin/bash",
- "set -euo pipefail",
- "exec docker import " + " ".join([
- "-c '%s'" % attr
- for attr in ctx.attr.statements
- ]) + " " + " ".join([
- "'%s'" % f.path
- for f in ctx.files.data
- ]) + " $1",
- "",
- ]
- ctx.actions.write(importer, "\n".join(importer_content), is_executable = True)
- return [DefaultInfo(
- runfiles = ctx.runfiles(ctx.files.data),
- executable = importer,
- )]
-
-docker_image = rule(
- implementation = _docker_image_impl,
- doc = "Tool to load a Docker image; takes a single parameter (image name).",
- attrs = {
- "statements": attr.string_list(doc = "Extra Dockerfile directives."),
- "data": attr.label_list(doc = "All image data."),
- },
- executable = True,
-)