Skip to content

Commit

Permalink
docs: add runtime_user directive in the stacker.yaml description
Browse files Browse the repository at this point in the history
Signed-off-by: mbshields <[email protected]>
  • Loading branch information
mbshields committed Apr 17, 2024
1 parent e61c020 commit cfd5efc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/reference/stacker_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,15 @@ overlay_dirs:
This example will result in all the files/dirs from the host's /path/to/directory to be available under container's /usr/local/ and all the files/dirs from the host's /path/to/directory2 to be available under container's /


### `environment`, `labels`, `working_dir`, `volumes`, `cmd`, `entrypoint`, `user`
### `environment`, `labels`, `working_dir`, `volumes`, `cmd`, `entrypoint`

These correspond exactly to the similarly named bits in the [OCI image
config spec](https://github.com/opencontainers/image-spec/blob/master/config.md#properties),
These entries correspond exactly to the similarly named bits in the [OCI image config spec](https://github.com/opencontainers/image-spec/blob/master/config.md#properties),
and are available for users to pass variables through to the runtime environment of the image.

### `runtime_user`

The `runtime_user` entry sets the `user` field in the container configuration, as defined in the [OCI Image config spec](https://github.com/opencontainers/image-spec/blob/master/config.md#properties).

### `generate_labels`

The `generate_labels` entry is similar to `run` in that it contains a list of commands to run inside the generated rootfs. It runs after the `run` section is done, and its mutations to the filesystem are not recorded, except in one case: `/oci-labels`. `/oci-labels` is a special directory where this code can write a file, and the name of the file will be the OCI label name, and the content will be the label content.
Expand Down Expand Up @@ -211,7 +214,7 @@ When `stacker build -f parent/folder1/stacker.yaml` is invoked, stacker searches
a.b.c.key: abc_val
p.q.r.key: pqr_val

While the `config` section supports a similar `labels`, it is more pertinent to the image runtime. On the other hand, `annotations` is intended to be image-specific metadata aligned with the [annotations in the image spec](https://github.com/opencontainers/image-spec/blob/main/annotations.md).
While the `config` section supports a similar `labels`, it is more pertinent to the image runtime. On the other hand, `annotations` is intended to be image-specific metadata aligned with the [annotations in the OCI Image spec](https://github.com/opencontainers/image-spec/blob/main/annotations.md).

### os

Expand Down

0 comments on commit cfd5efc

Please sign in to comment.