Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add runtime_user directive in the stacker.yaml description #56

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading