You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Called by the `container_image` macro with **kwargs, see below
@@ -29,6 +29,7 @@ Called by the `container_image` macro with **kwargs, see below
29
29
| <aid="container_image_-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required ||
30
30
| <aid="container_image_-architecture"></a>architecture | The desired CPU architecture to be used as label in the container image. | String | optional | "amd64" |
31
31
| <aid="container_image_-base"></a>base | The base layers on top of which to overlay this layer, equivalent to FROM. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
32
+
| <aid="container_image_-build_context_data"></a>build_context_data | Provides info about the build context, such as stamping.<br><br>By default it reads from the bazel command line, such as the <code>--stamp</code> argument. Use this to override values for this target, such as enabling or disabling stamping. You can use the <code>build_context_data</code> rule from <code>@io_bazel_rules_docker//docker:context.bzl</code> to create a BuildContextInfo and override the --stamp config setting. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | @io_bazel_rules_docker//docker:build_context_data|
| <aid="container_image_-cmd"></a>cmd | List of commands to execute in the image.<br><br> See https://docs.docker.com/engine/reference/builder/#cmd<br><br> The behavior between using <code>""</code> and <code>[]</code> may differ. Please see [#1448](https://github.com/bazelbuild/rules_docker/issues/1448) for more details.<br><br> Set <code>cmd</code> to <code>None</code>, <code>[]</code> or <code>""</code> will set the <code>Cmd</code> of the image to be <code>null</code>.<br><br> This field supports stamp variables. | List of strings | optional |[]|
34
35
| <aid="container_image_-compression"></a>compression | Compression method for image layer. Currently only gzip is supported.<br><br> This affects the compressed layer, which is by the <code>container_push</code> rule. It doesn't affect the layers specified by the <code>layers</code> attribute. | String | optional | "gzip" |
@@ -66,7 +67,6 @@ Called by the `container_image` macro with **kwargs, see below
66
67
| <aid="container_image_-ports"></a>ports | List of ports to expose.<br><br> See https://docs.docker.com/engine/reference/builder/#expose| List of strings | optional |[]|
67
68
| <aid="container_image_-repository"></a>repository | The repository for the default tag for the image.<br><br> Images generated by <code>container_image</code> are tagged by default to <code>bazel/package_name:target</code> for a <code>container_image</code> target at <code>//package/name:target</code>.<br><br> Setting this attribute to <code>gcr.io/dummy</code> would set the default tag to <code>gcr.io/dummy/package_name:target</code>. | String | optional | "bazel" |
| <aid="container_image_-stamp"></a>stamp | If true, enable use of workspace status variables (e.g. <code>BUILD_USER</code>, <code>BUILD_EMBED_LABEL</code>, and custom values set using <code>--workspace_status_command</code>) in tags.<br><br> These fields are specified in attributes using Python format syntax, e.g. <code>foo{BUILD_USER}bar</code>. | Boolean | optional | False |
70
70
| <aid="container_image_-symlinks"></a>symlinks | Symlinks to create in the Docker image.<br><br> For example,<br><br> symlinks = { "/path/to/link": "/path/to/target", ... }, | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
71
71
| <aid="container_image_-tars"></a>tars | Tar file to extract in the layer.<br><br> A list of tar files whose content should be in the Docker image. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional |[]|
72
72
| <aid="container_image_-user"></a>user | The user that the image should run as.<br><br> See https://docs.docker.com/engine/reference/builder/#user<br><br> Because building the image never happens inside a Docker container, this user does not affect the other actions (e.g., adding files).<br><br> This field supports stamp variables. | String | optional | "" |
0 commit comments