Add `extra_deps` attribute to `container_run_and_commit`*
#1003 (with a follow-up fix in #1933) added an extra_deps attribute to container_run_and_extract:
https://github.com/bazelbuild/rules_docker/blob/1bb136eb4661624eb8ac1e607cdf74369987b46d/docker/util/run.bzl#L58-L61
The attribute is needed by container_run_and_commit and container_run_and_commit_layer for exactly the same reason.
Is it not possible to chain together container_run_and_commit_layer and container_image?
For example
container_image(
name = "stage_1",
tars = [
":app",
],
)
container_run_and_commit_layer(
name = "stage_2",
image = ":stage_1.tar",
commands = [ "setup.sh" ],
)
Assume that setup.sh requires a file to be mounted in the container (i.e. with docker -v). The dependency which generates that file should be specified directly in container_run_and_commit_layer.
It can be expensive to run container_image. We don't need to call it for the sole purpose of making sure a dependency is satisfied for an independent rule. (Consider that the container image may already exist.)
FYI https://github.com/bazelbuild/rules_docker/pull/2209
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_docker!
/remove-labels "Can Close?"