feat(resources): add image details sheet with layer history (#925)

Adds a read-only inspect panel for Docker images. Click the eye icon on
any image row to open a sheet showing:

- Overview: ID (with copy), size, created date, arch/OS, author, tags
- Config: Cmd, Entrypoint, WorkingDir, User, exposed ports, env (collapsible),
  labels (collapsible)
- Layers: ordered history list with size, age, and build command per layer.
  Empty layers (metadata-only) are dimmed.

Backend adds DockerController.inspectImage(id) which combines image.inspect()
and image.history() in parallel, exposed via GET /api/system/images/:id.
The route accepts both bare hex IDs and sha256-prefixed IDs, since the list
endpoint surfaces the prefixed form. Returns 400 for malformed IDs and 404
for missing images.

Documents the new panel in docs/features/resources.mdx under Images.
This commit is contained in:
Anso
2026-05-04 23:45:54 -04:00
committed by GitHub
parent d73ae59ab8
commit 7e5dc2d9ea
6 changed files with 399 additions and 0 deletions
+6
View File
@@ -435,6 +435,12 @@ class DockerController {
await image.remove({ force: true });
}
public async inspectImage(id: string) {
const image = this.docker.getImage(id);
const [inspect, history] = await Promise.all([image.inspect(), image.history()]);
return { inspect, history };
}
public async removeVolume(name: string) {
const volume = this.docker.getVolume(name);
await volume.remove({ force: true });