Skip to content

Commit

Permalink
doc: add usage
Browse files Browse the repository at this point in the history
Signed-off-by: Yves Brissaud <[email protected]>
  • Loading branch information
eunomie committed Oct 10, 2024
1 parent 6186eb7 commit 694f41e
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 2 deletions.
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
```

See the [Docker RunX reference](/docs/reference/runx.md) for more information.
* [Main Usage](#main-usage)
* [Reference](#reference)
* [Usage](#usage)
* [Actions Definition](#actions-definition)
* [Local Override](#local-override)
* [Implementation Details](#implementation-details)
* [CLI Plugin Installation](#cli-plugin-installation)
* [Manual Installation](#manual-installation)

## Main Usage

Expand Down Expand Up @@ -75,6 +82,42 @@ See more examples in the [examples](/examples) directory.

## Reference

### Usage

> `docker runx IMAGE --docs`
>
> Display the embedded documentation of an image and print the list of available actions.
> `docker runx IMAGE --list`
>
> Display the list of available actions for an image and let the user pick the one they want to run.
> `docker runx IMAGE ACTION`
>
> Run a specific action on an image.
> `docker runx IMAGE ACTION --docs`
>
> Display a detailed documentation of a specific action. This will also display the list of available options, shell scripts, environment variables.
> `docker runx IMAGE ACTION --opt OPTION_NAME=VALUE`
>
> Run a specific action and use the value provided on the command line instead of asking to the user.
> `docker runx IMAGE`
>
> If a default action is defined in the image manifest, it will run it. If not it will list the available actions and let the user pick the one to run.
> `docker runx decorate SRC_IMAGE --tag DEST_IMAGE`
>
> Decorate an image by adding the `runx` manifest to it. The `runx.yaml` and `README.md` files will be embedded in the image.
>
> If `scratch` is used as the source image, only the `runx` files will be embedded.
>
> The image will be pushed automatically, the image doesn't exist locally.
See the [Docker RunX reference](/docs/reference/runx.md) for more information.

### Actions Definition

All the possible actions are defined in a yaml file. The file is named `runx.yaml` by default, but you can specify another name using the `--with-config` flag when using the `decorate` command.
Expand Down
45 changes: 44 additions & 1 deletion docs/index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ layout: default
```

See the [Docker RunX reference](https://github.com/eunomie/docker-runx/blob/main/docs/reference/runx.md) for more information.
* [Main Usage](#main-usage)
* [Reference](#reference)
* [Usage](#usage)
* [Actions Definition](#actions-definition)
* [Local Override](#local-override)
* [Implementation Details](#implementation-details)
* [CLI Plugin Installation](#cli-plugin-installation)
* [Manual Installation](#manual-installation)

## Main Usage

Expand Down Expand Up @@ -79,6 +86,42 @@ See more examples in the [examples](https://github.com/eunomie/docker-runx/tree/

## Reference

### Usage

> `docker runx IMAGE --docs`
>
> Display the embedded documentation of an image and print the list of available actions.
> `docker runx IMAGE --list`
>
> Display the list of available actions for an image and let the user pick the one they want to run.
> `docker runx IMAGE ACTION`
>
> Run a specific action on an image.
> `docker runx IMAGE ACTION --docs`
>
> Display a detailed documentation of a specific action. This will also display the list of available options, shell scripts, environment variables.
> `docker runx IMAGE ACTION --opt OPTION_NAME=VALUE`
>
> Run a specific action and use the value provided on the command line instead of asking to the user.
> `docker runx IMAGE`
>
> If a default action is defined in the image manifest, it will run it. If not it will list the available actions and let the user pick the one to run.
> `docker runx decorate SRC_IMAGE --tag DEST_IMAGE`
>
> Decorate an image by adding the `runx` manifest to it. The `runx.yaml` and `README.md` files will be embedded in the image.
>
> If `scratch` is used as the source image, only the `runx` files will be embedded.
>
> The image will be pushed automatically, the image doesn't exist locally.
See the [Docker RunX reference](https://github.com/eunomie/docker-runx/blob/main/docs/reference/runx.md) for more information.

### Actions Definition

All the possible actions are defined in a yaml file. The file is named `runx.yaml` by default, but you can specify another name using the `--with-config` flag when using the `decorate` command.
Expand Down

0 comments on commit 694f41e

Please sign in to comment.