From 0c0f1edd7654f47620f6d05b9a476b0c18c18bfa Mon Sep 17 00:00:00 2001 From: Peter Lobsinger Date: Mon, 28 Oct 2024 11:53:11 -0700 Subject: [PATCH] doc: cover the inline-specified variants of arguments to oci_image (#705) --- docs/image.md | 14 +++++++------- oci/defs.bzl | 21 ++++++++++++++------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/docs/image.md b/docs/image.md index 662d4960..98522cb8 100644 --- a/docs/image.md +++ b/docs/image.md @@ -113,13 +113,13 @@ This is similar to the same-named target created by rules_docker's `container_im | Name | Description | Default Value | | :------------- | :------------- | :------------- | | name | name of resulting oci_image_rule | none | -| labels | Labels for the image config. See documentation above. | `None` | -| annotations | Annotations for the image config. See documentation above. | `None` | -| env | Environment variables provisioned by default to the running container. See documentation above. | `None` | -| cmd | Command & argument configured by default in the running container. See documentation above. | `None` | -| entrypoint | Entrypoint configured by default in the running container. See documentation above. | `None` | -| exposed_ports | Exposed ports in the running container. See documentation above. | `None` | -| volumes | Volumes for the container. See documentation above. | `None` | +| labels | Labels for the image config. May either be specified as a file, as with the documentation above, or a dict of strings to specify values inline. | `None` | +| annotations | Annotations for the image config. May either be specified as a file, as with the documentation above, or a dict of strings to specify values inline. | `None` | +| env | Environment variables provisioned by default to the running container. May either be specified as a file, as with the documentation above, or a dict of strings to specify values inline. | `None` | +| cmd | Command & argument configured by default in the running container. May either be specified as a file, as with the documentation above. or a list of strings to specify values inline. | `None` | +| entrypoint | Entrypoint configured by default in the running container. May either be specified as a file, as with the documentation above. or a list of strings to specify values inline. | `None` | +| exposed_ports | Exposed ports in the running container. May either be specified as a file, as with the documentation above. or a list of strings to specify values inline. | `None` | +| volumes | Volumes for the container. May either be specified as a file, as with the documentation above. or a list of strings to specify values inline. | `None` | | kwargs | other named arguments to [oci_image_rule](#oci_image_rule) and [common rule attributes](https://bazel.build/reference/be/common-definitions#common-attributes). | none | diff --git a/oci/defs.bzl b/oci/defs.bzl index bee35038..fab48105 100644 --- a/oci/defs.bzl +++ b/oci/defs.bzl @@ -49,13 +49,20 @@ def oci_image(name, labels = None, annotations = None, env = None, cmd = None, e Args: name: name of resulting oci_image_rule - labels: Labels for the image config. See documentation above. - annotations: Annotations for the image config. See documentation above. - env: Environment variables provisioned by default to the running container. See documentation above. - cmd: Command & argument configured by default in the running container. See documentation above. - entrypoint: Entrypoint configured by default in the running container. See documentation above. - exposed_ports: Exposed ports in the running container. See documentation above. - volumes: Volumes for the container. See documentation above. + labels: Labels for the image config. + May either be specified as a file, as with the documentation above, or a dict of strings to specify values inline. + annotations: Annotations for the image config. + May either be specified as a file, as with the documentation above, or a dict of strings to specify values inline. + env: Environment variables provisioned by default to the running container. + May either be specified as a file, as with the documentation above, or a dict of strings to specify values inline. + cmd: Command & argument configured by default in the running container. + May either be specified as a file, as with the documentation above. or a list of strings to specify values inline. + entrypoint: Entrypoint configured by default in the running container. + May either be specified as a file, as with the documentation above. or a list of strings to specify values inline. + exposed_ports: Exposed ports in the running container. + May either be specified as a file, as with the documentation above. or a list of strings to specify values inline. + volumes: Volumes for the container. + May either be specified as a file, as with the documentation above. or a list of strings to specify values inline. **kwargs: other named arguments to [oci_image_rule](#oci_image_rule) and [common rule attributes](https://bazel.build/reference/be/common-definitions#common-attributes). """