From b3c15b849028406b628ae7922f2fa03f24967c04 Mon Sep 17 00:00:00 2001 From: Hannes Kaeufler Date: Fri, 25 Oct 2024 22:19:21 +0200 Subject: [PATCH] Update docs with `create` attribute --- docs/image.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/image.md b/docs/image.md index 662d4960..8d7a29aa 100644 --- a/docs/image.md +++ b/docs/image.md @@ -11,8 +11,8 @@ load("@rules_oci//oci:defs.bzl", ...) ## oci_image_rule
-oci_image_rule(name, annotations, architecture, base, cmd, entrypoint, env, exposed_ports, labels,
-               os, resource_set, tars, user, variant, volumes, workdir)
+oci_image_rule(name, annotations, architecture, base, cmd, created, entrypoint, env, exposed_ports,
+               labels, os, resource_set, tars, user, variant, volumes, workdir)
 
Build an OCI compatible container image. @@ -72,6 +72,7 @@ oci_image( | architecture | The CPU architecture which the binaries in this image are built to run on. eg: `arm64`, `arm`, `amd64`, `s390x`. See $GOARCH documentation for possible values: https://go.dev/doc/install/source#environment | String | optional | `""` | | base | Label to an oci_image target to use as the base. | Label | optional | `None` | | cmd | A file containing a newline separated list to be used as the `command & args` of the container. These values act as defaults and may be replaced by any specified when creating a container. | Label | optional | `None` | +| created | The datetime when the image was created. This can be a file containing a string in the format `YYYY-MM-DDTHH:MM:SS.sssZ` Typically, you'd provide a file containing a stamp variable replaced by the datetime of the build when executed with `--stamp`. | Label | optional | `None` | | entrypoint | A file containing a newline separated list to be used as the `entrypoint` to execute when the container starts. These values act as defaults and may be replaced by an entrypoint specified when creating a container. NOTE: Setting this attribute will reset the `cmd` attribute | Label | optional | `None` | | env | A file containing the default values for the environment variables of the container. These values act as defaults and are merged with any specified when creating a container. Entries replace the base environment variables if any of the entries has conflicting keys. To merge entries with keys specified in the base, `${KEY}` or `$KEY` syntax may be used. | Label | optional | `None` | | exposed_ports | A file containing a comma separated list of exposed ports. (e.g. 2000/tcp, 3000/udp or 4000. No protocol defaults to tcp). | Label | optional | `None` | @@ -90,7 +91,7 @@ oci_image( ## oci_image
-oci_image(name, labels, annotations, env, cmd, entrypoint, exposed_ports, volumes, kwargs)
+oci_image(name, created, labels, annotations, env, cmd, entrypoint, exposed_ports, volumes, kwargs)
 
Macro wrapper around [oci_image_rule](#oci_image_rule). @@ -113,6 +114,7 @@ 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 | +| created | File label to a file containing a single datetime string. See documentation above. | `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` |