aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2016-06-10 09:26:07 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-06-10 12:37:00 +0000
commit8ca0ff9ec5a9ed63d40d477d4ab98301fd5ea191 (patch)
treeaaddfcb6584d0d8c003d1f8a1ce1e1b3188e2c40 /tools
parent3cf7187fd67d51ebf1d0543fb16fc2e2c6dc3baa (diff)
docker_build: use a flagfile when creating the layer.
Diffstat (limited to 'tools')
-rw-r--r--tools/build_defs/docker/docker.bzl6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/build_defs/docker/docker.bzl b/tools/build_defs/docker/docker.bzl
index 29a6a50328..2ab33c293a 100644
--- a/tools/build_defs/docker/docker.bzl
+++ b/tools/build_defs/docker/docker.bzl
@@ -103,11 +103,13 @@ def _build_layer(ctx):
args += ["--deb=" + f.path for f in ctx.files.debs if f.path.endswith(".deb")]
args += ["--link=%s:%s" % (k, ctx.attr.symlinks[k])
for k in ctx.attr.symlinks]
+ arg_file = ctx.new_file(ctx.label.name + ".layer.args")
+ ctx.file_action(arg_file, "\n".join(args))
ctx.action(
executable = build_layer,
- arguments = args,
- inputs = ctx.files.files + ctx.files.tars + ctx.files.debs,
+ arguments = ["--flagfile=" + arg_file.path],
+ inputs = ctx.files.files + ctx.files.tars + ctx.files.debs + [arg_file],
outputs = [layer],
use_default_shell_env=True,
mnemonic="DockerLayer"