Add --list-volumes to list named volumes
Long-only (no free short letter left), lists each volume's name and host directory, tab-aligned the same way -l/--list-images already aligns name:tag output -- list_volumes_command() reuses that scheme. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv3s5jckJKzh6JkMoi2Akz
This commit is contained in:
@@ -58,6 +58,7 @@ slocker-lite -u|--umount <layer-id>
|
||||
slocker-lite -c|--cleanup <layer-id>
|
||||
slocker-lite -l|--list-images <directory>
|
||||
slocker-lite -v|--volume <name> <directory>
|
||||
slocker-lite --list-volumes
|
||||
slocker-lite -t|--test
|
||||
slocker-lite -h|--help
|
||||
slocker-lite -V|--version
|
||||
@@ -74,6 +75,7 @@ slocker-lite -V|--version
|
||||
| `--group <group>` | With `--user`, use this group (name or numeric gid) instead of the user's primary group. |
|
||||
| `-l, --list-images <dir>` | List OCI Image Layout tars (`*.tar`, `*.tar.*`) found directly in `<dir>`, with their `name:tag`. |
|
||||
| `-v, --volume <name> <dir>` | Create a named volume mapped to a host directory (created if missing), recorded in the config file's `volumes` section. Fails if the name or directory is already used by an existing volume. |
|
||||
| `--list-volumes` | List all named volumes (see `-v/--volume`) with their host directory. |
|
||||
| `-t, --test` | Print which `bwrap --unshare-xxx` namespaces the running kernel supports. |
|
||||
| `--log-level <level>` | Set log verbosity (`trace`, `debug`, `info`, `warn`, `error`, `critical`, `off`). |
|
||||
| `-h, --help` | Print usage and exit. |
|
||||
@@ -99,6 +101,9 @@ sudo ./buildDir/slocker-lite -r myimage.tar --user git
|
||||
|
||||
# Create a named volume backed by a host directory
|
||||
./buildDir/slocker-lite -v mydata ~/slocker-volumes/mydata
|
||||
|
||||
# List all named volumes
|
||||
./buildDir/slocker-lite --list-volumes
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Reference in New Issue
Block a user