v2.31.0-dev2 4b72742

images.md RawHistoryFolder

Images Command

List and prune runtime/registry images.

gordon images

gordon images <subcommand>

Subcommands:

  • list - List runtime images and registry tags.
  • prune - Prune dangling runtime images and old registry tags.
  • tags - List registry tags for a specific repository.

Note: Images commands require remote mode (--remote + --token, or configured remotes).

gordon images list

gordon images list
gordon images list --json

Shows image rows with repository, tag, size, creation time, image id, and dangling status. Rows that exist only in the registry (not currently present in the runtime cache) are included with unavailable runtime fields shown as -.

Flags:

Flag Description
--json Output images as JSON

JSON Output

gordon images list --json
[
  {
    "repository": "myapp",
    "tag": "latest",
    "size": "148MB",
    "created_at": "2026-03-13T10:15:00Z",
    "image_id": "sha256:abc123def456",
    "dangling": false
  }
]

gordon images prune

gordon images prune [--dry-run] [--keep-releases <n>] [--dangling] [--registry] [--no-confirm]

By default, prune removes dangling runtime images and applies registry tag retention (keeping latest + 3 previous non-latest tags per repository). A confirmation prompt is shown before destructive operations.

Flags:

Flag Default Description
--dry-run false Show prune behavior without applying changes
--keep-releases 3 Number of previous non-latest tags to keep per repository (latest is always preserved)
--dangling false Restrict scope to dangling runtime images only
--registry false Restrict scope to registry tag retention only
--no-confirm false Skip the confirmation prompt

Scope resolution

  • No scope flags (default): both runtime and registry cleanup run.
  • --dangling: only runtime dangling images are pruned; registry is skipped.
  • --registry: only registry tag retention runs; runtime is skipped.
  • --dangling --registry: both scopes run (same as default, but explicit).

Retention semantics

  • latest is always preserved when present.
  • --keep-releases counts non-latest tags, ordered by most recent first.
  • --keep-releases=0 with registry scope enabled still runs registry cleanup but keeps no non-latest tags.

gordon images tags

gordon images tags <repository>
gordon images tags <repository> --json

Lists all tags in the Gordon registry for the specified repository.

Flags:

Flag Description
--json Output repository and tags as JSON

JSON Output

gordon images tags myapp --json
{
  "repository": "myapp",
  "tags": ["latest", "v1.2.0", "v1.1.0"]
}

Examples

# List images
gordon images list

# Prune everything with defaults (dangling + registry, keep latest + 3)
gordon images prune

# List tags for a repository
gordon images tags myapp

# Prune dangling runtime images only
gordon images prune --dangling

# Prune registry tags only, keeping latest + 5 previous
gordon images prune --registry --keep-releases 5

# Preview cleanup without applying
gordon images prune --dry-run

# Skip confirmation prompt
gordon images prune --no-confirm

Required Permissions

  • The list subcommand requires admin:status:read.
  • The prune subcommand requires admin:config:write.
  • The tags subcommand requires admin:status:read.
source
1# Images Command
2
3List and prune runtime/registry images.
4
5## gordon images
6
7```bash
8gordon images <subcommand>
9```
10
11Subcommands:
12
13- `list` - List runtime images and registry tags.
14- `prune` - Prune dangling runtime images and old registry tags.
15- `tags` - List registry tags for a specific repository.
16
17> **Note:** Images commands require remote mode (`--remote` + `--token`, or configured remotes).
18
19## gordon images list
20
21```bash
22gordon images list
23gordon images list --json
24```
25
26Shows image rows with repository, tag, size, creation time, image id, and dangling status.
27Rows that exist only in the registry (not currently present in the runtime cache) are included with unavailable runtime fields shown as `-`.
28
29Flags:
30
31| Flag | Description |
32|------|-------------|
33| `--json` | Output images as JSON |
34
35### JSON Output
36
37```bash
38gordon images list --json
39```
40
41```json
42[
43  {
44    "repository": "myapp",
45    "tag": "latest",
46    "size": "148MB",
47    "created_at": "2026-03-13T10:15:00Z",
48    "image_id": "sha256:abc123def456",
49    "dangling": false
50  }
51]
52```
53
54## gordon images prune
55
56```bash
57gordon images prune [--dry-run] [--keep-releases <n>] [--dangling] [--registry] [--no-confirm]
58```
59
60By default, prune removes dangling runtime images **and** applies registry tag retention (keeping `latest` + 3 previous non-`latest` tags per repository). A confirmation prompt is shown before destructive operations.
61
62Flags:
63
64| Flag | Default | Description |
65|------|---------|-------------|
66| `--dry-run` | `false` | Show prune behavior without applying changes |
67| `--keep-releases` | `3` | Number of previous non-`latest` tags to keep per repository (`latest` is always preserved) |
68| `--dangling` | `false` | Restrict scope to dangling runtime images only |
69| `--registry` | `false` | Restrict scope to registry tag retention only |
70| `--no-confirm` | `false` | Skip the confirmation prompt |
71
72### Scope resolution
73
74- **No scope flags** (default): both runtime and registry cleanup run.
75- **`--dangling`**: only runtime dangling images are pruned; registry is skipped.
76- **`--registry`**: only registry tag retention runs; runtime is skipped.
77- **`--dangling --registry`**: both scopes run (same as default, but explicit).
78
79### Retention semantics
80
81- `latest` is always preserved when present.
82- `--keep-releases` counts non-`latest` tags, ordered by most recent first.
83- `--keep-releases=0` with registry scope enabled still runs registry cleanup but keeps no non-`latest` tags.
84
85## gordon images tags
86
87```bash
88gordon images tags <repository>
89gordon images tags <repository> --json
90```
91
92Lists all tags in the Gordon registry for the specified repository.
93
94Flags:
95
96| Flag | Description |
97|------|-------------|
98| `--json` | Output repository and tags as JSON |
99
100### JSON Output
101
102```bash
103gordon images tags myapp --json
104```
105
106```json
107{
108  "repository": "myapp",
109  "tags": ["latest", "v1.2.0", "v1.1.0"]
110}
111```
112
113## Examples
114
115```bash
116# List images
117gordon images list
118
119# Prune everything with defaults (dangling + registry, keep latest + 3)
120gordon images prune
121
122# List tags for a repository
123gordon images tags myapp
124
125# Prune dangling runtime images only
126gordon images prune --dangling
127
128# Prune registry tags only, keeping latest + 5 previous
129gordon images prune --registry --keep-releases 5
130
131# Preview cleanup without applying
132gordon images prune --dry-run
133
134# Skip confirmation prompt
135gordon images prune --no-confirm
136```
137
138## Required Permissions
139
140- The `list` subcommand requires `admin:status:read`.
141- The `prune` subcommand requires `admin:config:write`.
142- The `tags` subcommand requires `admin:status:read`.
143
144## Related
145
146- [CLI Commands](./index.md)
147- [Images Configuration](../config/images.md)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close