Rules in this directory provide functionality to run commands inside a docker container. Note these rules require a docker binary to be present and configured properly via docker toolchain rules.
container_run_and_commit(name, commands, docker_run_flags, image)
This rule runs a set of commands in a given image, waits for the commands to finish, and then commits the container to a new image.
name |
Name; required
A unique name for this target. |
commands |
List of strings; required
A list of commands to run (sequentially) in the container. |
docker_run_flags |
List of strings; optional
Extra flags to pass to the docker run command. |
image |
Label; required
The image to run the commands in. |
container_run_and_extract(name, commands, docker_run_flags, extract_file, image)
This rule runs a set of commands in a given image, waits for the commands to finish, and then extracts a given file from the container to the bazel-out directory.
name |
Name; required
A unique name for this target. |
commands |
List of strings; required
A list of commands to run (sequentially) in the container. |
docker_run_flags |
List of strings; optional
Extra flags to pass to the docker run command. |
extract_file |
String; required
Path to file to extract from container. |
image |
Label; required
The image to run the commands in. |