signalk-container 1.21.0 → 1.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +14 -0
- package/README.md +11 -2
- package/dist/containers.d.ts +22 -4
- package/dist/containers.d.ts.map +1 -1
- package/dist/containers.js +86 -20
- package/dist/containers.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -5
- package/dist/index.js.map +1 -1
- package/dist/jobs.d.ts +1 -1
- package/dist/jobs.d.ts.map +1 -1
- package/dist/jobs.js +27 -21
- package/dist/jobs.js.map +1 -1
- package/dist/namespace.d.ts +47 -0
- package/dist/namespace.d.ts.map +1 -0
- package/dist/namespace.js +87 -0
- package/dist/namespace.js.map +1 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -1
- package/doc/plugin-developer-guide.md +12 -0
- package/package.json +1 -1
- package/public/configpanel-entry.js +8 -8
package/AGENTS.md
CHANGED
|
@@ -51,6 +51,16 @@ Do not add error handling, fallbacks, or validation for scenarios that cannot ha
|
|
|
51
51
|
|
|
52
52
|
These are non-obvious rules baked into the runtime layer. Breaking them produces silent failures or runtime-specific bugs.
|
|
53
53
|
|
|
54
|
+
### Container-name namespace
|
|
55
|
+
|
|
56
|
+
Every managed container, one-shot job container, and job label carries a **namespace prefix** so two Signal K servers sharing one container runtime never collide, reap, or drift-recreate each other's containers. The canonical case is a devcontainer dev instance and a production install on the same host, both talking to the same rootless-Podman socket: without a namespace the dev server's `ensureRunning("questdb")` would inspect the production `sk-questdb`, and its job reaper (`cleanupOrphanedJobs`) could force-remove production `sk-job-*` helpers.
|
|
57
|
+
|
|
58
|
+
- `src/namespace.ts` is the single source of truth. The namespace token defaults to `sk`, so an install that sets no env var produces **the same container names, job names, and label keys** as prior releases: containers `sk-<name>`, jobs `sk-job-<id>`, labels `sk-charts-job` / `sk-job-owner` / `sk-job-label`.
|
|
59
|
+
- `setNamespace(process.env.SIGNALK_CONTAINER_NAMESPACE, onInvalid)` runs once in `plugin.start()`, **before** anything creates or reaps a container. `plugin.stop()` calls `resetNamespace()` (mirrors the `setDisableUserns` lifecycle — see below). The value is boundary-validated: 1–32 lowercase alphanumerics; anything else logs via `app.error` and falls back to `sk` so a typo can't crash startup or produce an invalid container name.
|
|
60
|
+
- Everything derives from the token via the accessors — `containerPrefix()`, `jobPrefix()`, `jobMarkerLabel()`, `jobOwnerLabel()`, `jobNameLabel()`. Never re-hardcode `"sk-"`; `prefixedName()` is the sole place a bare name becomes a container name — call it, never re-implement a `startsWith("sk-")` prefix check.
|
|
61
|
+
- The **label keys** are namespaced too (`<ns>-charts-job`, `<ns>-job-owner`, `<ns>-job-label`), so a dev instance's reap query doesn't even _list_ production's jobs. The name-prefix guard in `orphanFromContainer` (`name.startsWith(jobPrefix())`) remains the unspoofable-by-label trait — and being namespaced, it can never match a foreign-namespace helper.
|
|
62
|
+
- The devcontainer sets `SIGNALK_CONTAINER_NAMESPACE=devpod` (in the installer repo's `dev/dev.sh`), so its containers are `devpod-<name>`. Note the prefix isolates **names and reaping**, not host **ports** — a consumer plugin that publishes a fixed host port still collides port-wise with its production twin; that is handled separately (pick non-colliding ports for dev).
|
|
63
|
+
|
|
54
64
|
### Podman SELinux flag
|
|
55
65
|
|
|
56
66
|
`volumeArg(hostPath, containerPath, runtime)` adds `:Z` for podman bind mounts (Fedora/RHEL SELinux relabel). Named volumes — host strings without a leading `/` or `.` — MUST NOT receive `:Z`; podman rejects them with `"invalid option z for named volume"`. Always go through `volumeArg`, never build `-v host:container[:flags]` strings inline.
|
|
@@ -69,6 +79,10 @@ When a consumer declares `signalkConfigRootMount` and does not set `env.HOME`, t
|
|
|
69
79
|
|
|
70
80
|
The injection is in `defaultHomeForConfigRoot()` (`src/containers.ts`) and only fires when the consumer's `env.HOME` is `undefined`. A defined-but-empty `HOME=""` is left alone — that's a deliberate consumer opt-out (tools behave differently with `HOME=""` than unset). Consumers that need HOME to point somewhere _other_ than the config root mount just set it themselves.
|
|
71
81
|
|
|
82
|
+
### TZ defaulting (host timezone propagation)
|
|
83
|
+
|
|
84
|
+
Same pattern as HOME defaulting: the wrapper in `src/index.ts` injects `TZ=<host zone>` into `config.env` for both `ensureRunning` (which `recreate` inherits) and `runJob`, via `defaultTimezoneEnv()` in `src/containers.ts`. A consumer-set `env.TZ` — any value, including `""` — always wins. `resolveHostTimezone()` reads the zone via `Intl` (honors the process `TZ` env var, falls back to `/etc/localtime`) and returns `undefined` for UTC-equivalent zones (`UTC_ZONE_NAMES`), so nothing is injected on a UTC host — which is also the in-container deployment where the real host zone is unknowable unless the operator passed it into the SignalK container. Injection happens **before** any other config shaping in the wrapper so the TZ key flows into `lastConfigs` and drift detection like a consumer-set key; do not inject at the `containers.ts`/`buildRunArgs` layer, where the diff would not see it.
|
|
85
|
+
|
|
72
86
|
### Container log streaming
|
|
73
87
|
|
|
74
88
|
Two-layer structure (`src/containers.ts` → `src/log-stream-broker.ts`):
|
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ Instead of each plugin implementing its own container orchestration, they delega
|
|
|
19
19
|
- **Zero-config data dir sharing** -- `signalkDataMount` mounts the SignalK data directory into any managed container automatically, whether Signal K runs bare-metal, in Docker (named volume), or in Podman (named volume or bind mount). No host paths to configure.
|
|
20
20
|
- **Zero-config config root sharing** -- `signalkConfigRootMount` mounts the entire SignalK installation config (`~/.signalk/`) — for backup, audit, or config-sync tools that need the whole tree, not the per-plugin subdirectory.
|
|
21
21
|
- **Zero-config container service connectivity** -- `signalkAccessiblePorts` lets the SignalK process connect back to a service running inside a managed container (e.g. an HTTP or TCP server). signalk-container picks the right networking strategy automatically — port binding on the host loopback for bare-metal deployments, or a shared Docker network with DNS for containerised ones. No host ports are exposed unnecessarily.
|
|
22
|
+
- **Host timezone propagation** -- managed containers and one-shot jobs get `TZ=<host zone>` injected automatically, so time-based logic inside them (cron-style Node-RED flows, Grafana/QuestDB time rendering, log timestamps) agrees with the host clock instead of defaulting to UTC. Consumer plugins that set `env.TZ` themselves keep full control; shell-level tools inside minimal images may additionally need the image's `tzdata` package to interpret the zone name. See the [developer guide](doc/plugin-developer-guide.md#host-timezone).
|
|
22
23
|
- **SELinux support** -- `:Z` volume flags for Podman bind mounts on Fedora/RHEL; named volumes are handled correctly (`:Z` is not applied)
|
|
23
24
|
- **Per-volume host-source policy** -- volumes accept `{ source, ifMissing: "skip" | "abort" }` for user-managed (USB drives, NFS) or deployment-required (TLS certs) mounts. Plugins subscribe to `onVolumeIssue` events for `'skipped'`, `'aborted'`, and `'recovered'` actions; signalk-container auto-recreates the container when a previously-missing source reappears. See the [developer guide](doc/plugin-developer-guide.md#optional-and-required-volumes).
|
|
24
25
|
- **Container log streaming** -- click **Logs** on any managed-container card to open a live-streaming popup of the container's stdout+stderr (combined, the same shape `podman logs <name>` produces). Plugin authors can also wire `onContainerLog` in `ensureRunning` options to forward the same stream into their plugin's `app.debug` channel — visible in the Signal K server log when debug is enabled. Multiple subscribers share a single underlying log stream. See the [developer guide](doc/plugin-developer-guide.md#streaming-container-logs-into-your-plugins-debug-channel).
|
|
@@ -752,10 +753,10 @@ See [doc/plugin-developer-guide.md](doc/plugin-developer-guide.md) for the full
|
|
|
752
753
|
| `remove(name)` | Stop and remove a container |
|
|
753
754
|
| `getState(name)` | Returns `running`, `stopped`, `missing`, or `no-runtime` |
|
|
754
755
|
| `runJob(config)` | Execute a one-shot container job. Pass `config.signal` (an `AbortSignal`) to cancel a job mid-run — aborting force-removes the container and resolves with status `cancelled` (1.16.0+) |
|
|
755
|
-
| `cleanupOrphanedJobs(filter)` | Reap `sk-job-*`
|
|
756
|
+
| `cleanupOrphanedJobs(filter)` | Reap this namespace's job containers (`<ns>-job-*`, `sk-job-*` by default) leaked by a previous server lifecycle, filtered by the caller's `ownerPluginId`. Idempotent — returns `{ reaped: OrphanJobInfo[] }` so the plugin can roll back any per-job state it had written |
|
|
756
757
|
| `getLogs(name, options?)` | One-shot fetch of the last N lines of a container's combined stdout+stderr log. `tail` defaults to 200, max 10000; `since` is unix-epoch seconds |
|
|
757
758
|
| `prune()` | Remove dangling images |
|
|
758
|
-
| `listContainers()` | List all `sk-`
|
|
759
|
+
| `listContainers()` | List all containers in this namespace (`<ns>-` prefixed, `sk-` by default) |
|
|
759
760
|
| `execInContainer(name, command)` | Run a command inside a running container |
|
|
760
761
|
| `ensureNetwork(name)` | Create a Podman/Docker network if it doesn't exist |
|
|
761
762
|
| `removeNetwork(name)` | Remove a network |
|
|
@@ -817,6 +818,14 @@ All mounted at `/plugins/signalk-container/api/`:
|
|
|
817
818
|
| Disable user-namespace remap | `false` | Suppress rootless-Podman `--userns=keep-id` on filesystems that cannot be id-mapped (ZFS, some encrypted FS). Secondary escape hatch only — the recommended primary fix is host-side `fuse-overlayfs` storage (see [ZFS host notes](#zfs-and-other-idmap-incompatible-filesystems)). |
|
|
818
819
|
| Container overrides | `{}` | Per-container resource limits (CPU, memory, PIDs). Field-level merged on top of consumer plugin defaults. See dev guide. |
|
|
819
820
|
|
|
821
|
+
### Container namespace (multiple Signal K servers on one host)
|
|
822
|
+
|
|
823
|
+
Every container and one-shot job this plugin creates is named with a **namespace prefix** — `sk-` by default (so `sk-questdb`, `sk-grafana`, `sk-job-<id>`). The prefix keeps two Signal K servers that share the same container runtime from stepping on each other: without it, a second server would see the first server's `sk-questdb`, treat it as its own, and could recreate or reap it.
|
|
824
|
+
|
|
825
|
+
Set the `SIGNALK_CONTAINER_NAMESPACE` environment variable on the Signal K process to change the prefix (1–32 lowercase letters/digits; an invalid value is ignored with a logged warning and falls back to `sk`). For example, a development instance launched with `SIGNALK_CONTAINER_NAMESPACE=devpod` manages `devpod-questdb`, `devpod-grafana`, `devpod-job-*` and never touches a production `sk-*` stack running on the same box. The stack's devcontainer sets this automatically.
|
|
826
|
+
|
|
827
|
+
This isolates container **names and job reaping**, not host **ports**: if a managed container publishes a fixed host port, two instances still can't both bind it. When you run two servers on one host, also give the second instance's containers non-colliding ports.
|
|
828
|
+
|
|
820
829
|
### ZFS and other idmap-incompatible filesystems
|
|
821
830
|
|
|
822
831
|
Rootless Podman uses `--userns=keep-id` so files written into bind mounts land owned by the Signal K host user. On filesystems the Linux kernel cannot id-map — ZFS is the canonical case, some encrypted filesystems behave the same way — this mapping either fails at container create or triggers a multi-minute per-file `chown` sweep across the image layers.
|
package/dist/containers.d.ts
CHANGED
|
@@ -56,6 +56,23 @@ export declare function volumeArg(hostPath: string, containerPath: string, runti
|
|
|
56
56
|
* with HOME added. Pure and synchronous so it's testable in isolation.
|
|
57
57
|
*/
|
|
58
58
|
export declare function defaultHomeForConfigRoot(env: Record<string, string> | undefined, configRootMount: string | undefined): Record<string, string> | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* The IANA zone the SignalK process runs in, or `undefined` when it is
|
|
61
|
+
* UTC (nothing to propagate — containers already default to UTC).
|
|
62
|
+
* `Intl` honors the `TZ` env var and falls back to the system zone
|
|
63
|
+
* (/etc/localtime), so both bare-metal and TZ-configured deployments
|
|
64
|
+
* resolve correctly. `systemZone` is injectable for tests.
|
|
65
|
+
*/
|
|
66
|
+
export declare function resolveHostTimezone(systemZone?: () => string): string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Default the container's `TZ` to the host timezone so wall-clock logic
|
|
69
|
+
* inside managed containers (cron-style Node-RED flows, log timestamps,
|
|
70
|
+
* Grafana/QuestDB time rendering) agrees with the host. A consumer that
|
|
71
|
+
* sets `env.TZ` itself — any value, including "" — wins; an unknown or
|
|
72
|
+
* UTC host zone injects nothing. Pure and synchronous, mirroring
|
|
73
|
+
* `defaultHomeForConfigRoot`.
|
|
74
|
+
*/
|
|
75
|
+
export declare function defaultTimezoneEnv(env: Record<string, string> | undefined, zone: string | undefined): Record<string, string> | undefined;
|
|
59
76
|
export declare function classifyVolumeSources(volumes: Record<string, string | VolumeSpec> | undefined, probe?: (path: string) => boolean): {
|
|
60
77
|
kept: Record<string, string>;
|
|
61
78
|
skipped: Array<{
|
|
@@ -192,10 +209,11 @@ export declare function getContainerLogs(runtime: ContainerRuntimeInfo, name: st
|
|
|
192
209
|
export declare function qualifyImage(image: string, runtime: ContainerRuntimeInfo): string;
|
|
193
210
|
/**
|
|
194
211
|
* The qualified repo forms a managed image can appear under in podman's
|
|
195
|
-
* local `repoTags`.
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
212
|
+
* local `repoTags`. `qualifyImage` emits podman's canonical spelling
|
|
213
|
+
* (including the implicit `library/` namespace for single-name Docker
|
|
214
|
+
* Hub repos), so this is normally a single form; the expansion below
|
|
215
|
+
* only fires for inputs that still reach it in the historical
|
|
216
|
+
* `docker.io/<name>` spelling (e.g. persisted manifest records).
|
|
199
217
|
*/
|
|
200
218
|
export declare function qualifiedRepoVariants(image: string, runtime: ContainerRuntimeInfo): string[];
|
|
201
219
|
export declare function imageExists(runtime: ContainerRuntimeInfo, image: string, client?: ContainerClient): Promise<boolean>;
|
package/dist/containers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containers.d.ts","sourceRoot":"","sources":["../src/containers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAGpC,OAAO,EACL,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EAEpB,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,WAAW,EACX,WAAW,EACX,UAAU,EACX,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,sBAAsB,EAIvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQ7C,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CACvB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,oBAAoB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B;AAED,wBAAsB,YAAY,CAChC,GAAG,EAAE,MAAM,EACX,SAAS,GAAE,MAAc,EACzB,UAAU,GAAE,MAAY,GACvB,OAAO,CAAC,IAAI,CAAC,CAYf"}
|
package/dist/containers.js
CHANGED
|
@@ -6,14 +6,13 @@ import { rm } from "node:fs/promises";
|
|
|
6
6
|
import { isContainerized, makeLineSplitter, userMappingFlags, } from "./runtime.js";
|
|
7
7
|
import { demuxToText, demuxBufferToText, getClient, safe, safeInspect, } from "./client.js";
|
|
8
8
|
import { resourcePayloadForRun } from "./resources.js";
|
|
9
|
+
import { containerPrefix } from "./namespace.js";
|
|
9
10
|
import { classifyTag } from "./updates/tagClassifier.js";
|
|
10
11
|
import { compareVersions } from "./updates/semver.js";
|
|
11
12
|
import { isOfflineError } from "./updates/offline.js";
|
|
12
|
-
const CONTAINER_PREFIX = "sk-";
|
|
13
13
|
export function prefixedName(name) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
: `${CONTAINER_PREFIX}${name}`;
|
|
14
|
+
const prefix = containerPrefix();
|
|
15
|
+
return name.startsWith(prefix) ? name : `${prefix}${name}`;
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
19
18
|
* Build the value for a `-v <source>:<dest>[:flags]` argument with the
|
|
@@ -93,6 +92,51 @@ export function defaultHomeForConfigRoot(env, configRootMount) {
|
|
|
93
92
|
return env;
|
|
94
93
|
return { ...env, HOME: configRootMount };
|
|
95
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Zone names that mean "no offset from UTC". Container images already
|
|
97
|
+
* default to UTC, so resolving one of these means there is nothing to
|
|
98
|
+
* propagate — and, in the in-container deployment, that the real host
|
|
99
|
+
* zone is unknowable from in here (the container's own /etc/localtime
|
|
100
|
+
* is UTC unless the operator passed the zone in).
|
|
101
|
+
*/
|
|
102
|
+
const UTC_ZONE_NAMES = new Set([
|
|
103
|
+
"UTC",
|
|
104
|
+
"Etc/UTC",
|
|
105
|
+
"Etc/Universal",
|
|
106
|
+
"Universal",
|
|
107
|
+
"GMT",
|
|
108
|
+
"Etc/GMT",
|
|
109
|
+
"Greenwich",
|
|
110
|
+
"Etc/Greenwich",
|
|
111
|
+
"Zulu",
|
|
112
|
+
"Etc/Zulu",
|
|
113
|
+
]);
|
|
114
|
+
/**
|
|
115
|
+
* The IANA zone the SignalK process runs in, or `undefined` when it is
|
|
116
|
+
* UTC (nothing to propagate — containers already default to UTC).
|
|
117
|
+
* `Intl` honors the `TZ` env var and falls back to the system zone
|
|
118
|
+
* (/etc/localtime), so both bare-metal and TZ-configured deployments
|
|
119
|
+
* resolve correctly. `systemZone` is injectable for tests.
|
|
120
|
+
*/
|
|
121
|
+
export function resolveHostTimezone(systemZone = () => Intl.DateTimeFormat().resolvedOptions().timeZone) {
|
|
122
|
+
const zone = systemZone();
|
|
123
|
+
return UTC_ZONE_NAMES.has(zone) ? undefined : zone;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Default the container's `TZ` to the host timezone so wall-clock logic
|
|
127
|
+
* inside managed containers (cron-style Node-RED flows, log timestamps,
|
|
128
|
+
* Grafana/QuestDB time rendering) agrees with the host. A consumer that
|
|
129
|
+
* sets `env.TZ` itself — any value, including "" — wins; an unknown or
|
|
130
|
+
* UTC host zone injects nothing. Pure and synchronous, mirroring
|
|
131
|
+
* `defaultHomeForConfigRoot`.
|
|
132
|
+
*/
|
|
133
|
+
export function defaultTimezoneEnv(env, zone) {
|
|
134
|
+
if (!zone)
|
|
135
|
+
return env;
|
|
136
|
+
if (env?.TZ !== undefined)
|
|
137
|
+
return env;
|
|
138
|
+
return { ...env, TZ: zone };
|
|
139
|
+
}
|
|
96
140
|
export function classifyVolumeSources(volumes, probe = existsSync) {
|
|
97
141
|
const kept = {};
|
|
98
142
|
const skipped = [];
|
|
@@ -412,13 +456,24 @@ export function qualifyImage(image, runtime) {
|
|
|
412
456
|
// would otherwise make us think the first segment is `host:port`.
|
|
413
457
|
const refWithoutDigest = image.split("@", 1)[0];
|
|
414
458
|
const parts = refWithoutDigest.split("/");
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
459
|
+
if (parts.length === 1) {
|
|
460
|
+
// A single-segment ref can never carry a registry — a dot or
|
|
461
|
+
// colon here belongs to the tag (`alpine:3.19`), not a host.
|
|
462
|
+
// Single-name Docker Hub repos get the implicit `library/`
|
|
463
|
+
// namespace: podman canonicalizes `alpine` to
|
|
464
|
+
// `docker.io/library/alpine` and reports that form in
|
|
465
|
+
// `Config.Image`. Emitting anything else here would make
|
|
466
|
+
// `diffContainerConfig` compare the two spellings as different
|
|
467
|
+
// images and recreate the container on every ensureRunning call.
|
|
468
|
+
return `docker.io/library/${image}`;
|
|
469
|
+
}
|
|
470
|
+
// Treat the first component as a registry only if it has a dot, a
|
|
471
|
+
// colon (port), or is exactly "localhost". Otherwise, prefix
|
|
472
|
+
// docker.io/.
|
|
418
473
|
const looksLikeRegistry = parts[0].includes(".") ||
|
|
419
|
-
|
|
474
|
+
parts[0].includes(":") ||
|
|
420
475
|
parts[0] === "localhost";
|
|
421
|
-
if (parts.length
|
|
476
|
+
if (parts.length === 2 && !looksLikeRegistry) {
|
|
422
477
|
return `docker.io/${image}`;
|
|
423
478
|
}
|
|
424
479
|
}
|
|
@@ -426,10 +481,11 @@ export function qualifyImage(image, runtime) {
|
|
|
426
481
|
}
|
|
427
482
|
/**
|
|
428
483
|
* The qualified repo forms a managed image can appear under in podman's
|
|
429
|
-
* local `repoTags`.
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
484
|
+
* local `repoTags`. `qualifyImage` emits podman's canonical spelling
|
|
485
|
+
* (including the implicit `library/` namespace for single-name Docker
|
|
486
|
+
* Hub repos), so this is normally a single form; the expansion below
|
|
487
|
+
* only fires for inputs that still reach it in the historical
|
|
488
|
+
* `docker.io/<name>` spelling (e.g. persisted manifest records).
|
|
433
489
|
*/
|
|
434
490
|
export function qualifiedRepoVariants(image, runtime) {
|
|
435
491
|
const qualified = qualifyImage(image, runtime);
|
|
@@ -540,7 +596,8 @@ export async function getRepoDigest(runtime, image, client = getClient()) {
|
|
|
540
596
|
*/
|
|
541
597
|
export async function getLiveContainerDigest(runtime, containerName, client = getClient()) {
|
|
542
598
|
// The caller passes the unprefixed name from `ensureRunning`; the
|
|
543
|
-
// running container always carries the `sk-`
|
|
599
|
+
// running container always carries the namespace prefix (`sk-` by
|
|
600
|
+
// default — see namespace.ts).
|
|
544
601
|
const imageId = await getImageDigest(runtime, prefixedName(containerName), client);
|
|
545
602
|
if (!imageId)
|
|
546
603
|
return null;
|
|
@@ -1901,13 +1958,20 @@ onRemoved = () => { }) {
|
|
|
1901
1958
|
*/
|
|
1902
1959
|
export const WIPE_MOUNT_PATH = WIPE_MOUNT;
|
|
1903
1960
|
export async function listContainers(runtime, client = getClient()) {
|
|
1961
|
+
const prefix = containerPrefix();
|
|
1904
1962
|
const result = await safe(() => client.listContainers({
|
|
1905
1963
|
all: true,
|
|
1906
|
-
filters: { name: [
|
|
1964
|
+
filters: { name: [prefix] },
|
|
1907
1965
|
}));
|
|
1908
1966
|
if (!result.ok)
|
|
1909
1967
|
return [];
|
|
1910
|
-
|
|
1968
|
+
// The daemon `name` filter is a substring match, not a prefix match, so a
|
|
1969
|
+
// foreign container whose name merely *contains* the token (or another
|
|
1970
|
+
// namespace's container) can slip through. Anchor client-side so the
|
|
1971
|
+
// managed list only ever holds this namespace's containers.
|
|
1972
|
+
return result.value
|
|
1973
|
+
.filter((c) => (c.Names?.[0] ?? "").replace(/^\//, "").startsWith(prefix))
|
|
1974
|
+
.map((c) => {
|
|
1911
1975
|
// dockerode `Names` carries a leading slash; strip it to match the
|
|
1912
1976
|
// bare names the rest of the plugin uses.
|
|
1913
1977
|
const name = (c.Names?.[0] ?? "").replace(/^\//, "");
|
|
@@ -1919,6 +1983,8 @@ export async function listContainers(runtime, client = getClient()) {
|
|
|
1919
1983
|
.filter(Boolean);
|
|
1920
1984
|
return {
|
|
1921
1985
|
name,
|
|
1986
|
+
// The filter above guarantees `name` starts with `prefix`.
|
|
1987
|
+
unprefixedName: name.slice(prefix.length),
|
|
1922
1988
|
image: c.Image ?? "",
|
|
1923
1989
|
state,
|
|
1924
1990
|
created: c.Created ? String(c.Created) : "",
|
|
@@ -2092,10 +2158,10 @@ export async function reapSupersededImages(runtime, managed, keepImageVersions,
|
|
|
2092
2158
|
const bySize = new Map(summaries.map((s) => [s.id, s.size]));
|
|
2093
2159
|
// Qualify each managed repo the way podman qualifies the local
|
|
2094
2160
|
// `repoTags`, so the pure selector's string match lines up across
|
|
2095
|
-
// runtimes.
|
|
2096
|
-
// `docker.io/<name>`
|
|
2097
|
-
// `docker.io/library/<name
|
|
2098
|
-
//
|
|
2161
|
+
// runtimes. `qualifiedRepoVariants` also covers records persisted in
|
|
2162
|
+
// the historical `docker.io/<name>` spelling of single-name Docker
|
|
2163
|
+
// Hub images (podman reports `docker.io/library/<name>`), emitting
|
|
2164
|
+
// both forms with the same runningImageId.
|
|
2099
2165
|
const qualifiedManaged = managed.flatMap((m) => qualifiedRepoVariants(m.image, runtime).map((image) => ({ ...m, image })));
|
|
2100
2166
|
const ids = selectImagesToReap(summaries, qualifiedManaged, keepImageVersions);
|
|
2101
2167
|
let removed = 0;
|