Rewrite README to accomodate to changes to the script.

This commit is contained in:
2025-12-16 09:57:01 +01:00
parent d2f8eaf090
commit a155a48aaa

View File

@@ -5,18 +5,28 @@
This repository contains a Dockerfile for building an Azure CLI container image.
It is designed to be used as a operating environment for running Azure CLI commands,
while providing isolation from the host system. User's home directory is mounted
into the container to persist configuration and credentials. Volume is used to
while providing isolation from the host system. Volume is used to
persist home directory data.
## Usage
```bash
azure-cli [--account ACCOUNT_NAME] [--user CONTAINER_USERNAME] [ container CLI arguments... ]
```text
azure-cli (-l|--list)
```
- `--account ACCOUNT_NAME` - Specify the account name to use for the volume that stores the home directory data. Defaults to the current user's username.
- `--user CONTAINER_USERNAME` - Specify the username to use inside the container. Defaults `ubuntu`.
- `container CLI arguments...` - Any additional arguments are passed to the container CLI command (not the command inside the container).
List all containers created by this script.
> **Note:** Copy the `azure-cli` script to a directory in your `PATH` (e.g. `/usr/local/bin`) to use it as a regular command.
```text
azure-cli [(-a|--account) <account_name>]
[--user <user_name>]
[--name <container_name>]
[--volume <local_path>:<container_path>]
[--]
[ other arguments passed as a command to execute inside the container ]
```
- '--account <account_name>': Specifies the account name to be set as an environment variable inside the container. The volume name will be derived from this account name.
- '--user <user_name>': Specifies the user name to be used inside the container. Default is 'ubuntu'.
- '--name <container_name>': Specifies the name of the container. Default is sanitized account name.
- '--volume <local_path>:<container_path>': Binds additional local path to a path inside the container.
- '--': Indicates the end of options for the script. Any arguments following this will be passed as a command to execute inside the container.