docker: remove images no container or declaration uses, keeping the previous of each line (hq ADR 0251)
mesh/merge-gate pass: builds docker → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery superseded: a newer delivery to the same trunk took over its walk
mesh/merge-gate pass: builds docker → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery superseded: a newer delivery to the same trunk took over its walk
Images pulled by digest are not dangling, so the weekly prune never takes an old version and every machine keeps every image it ever ran. docker_prune_images takes them, keeps what the declaration names (asked of the controller; no answer, nothing removed) and the one before, and is a dry run unless asked with a why.
This commit is contained in:
@@ -20,6 +20,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
stdio "git.novox.be/novox/mesh-sdk/go"
|
||||
)
|
||||
|
||||
// MeshLabel is the label the host puts on every container it creates (mesh-host internal/apply).
|
||||
@@ -34,11 +36,14 @@ type Client struct {
|
||||
UID int
|
||||
ReadFile func(string) ([]byte, error)
|
||||
Now func() time.Time
|
||||
// Ask asks the mesh (the SDK's stdio.Ask); Node is this machine's name (MESH_NODE).
|
||||
Ask Asker
|
||||
Node string
|
||||
}
|
||||
|
||||
// NewClient is the client the bundle serves with.
|
||||
func NewClient() *Client {
|
||||
return &Client{Run: ExecRunner, UID: os.Getuid(), ReadFile: os.ReadFile, Now: time.Now}
|
||||
return &Client{Run: ExecRunner, UID: os.Getuid(), ReadFile: os.ReadFile, Now: time.Now, Ask: stdio.Ask, Node: os.Getenv("MESH_NODE")}
|
||||
}
|
||||
|
||||
var socketRefused = regexp.MustCompile(`(?i)permission denied.*docker.*sock|docker\.sock.*permission denied`)
|
||||
|
||||
Reference in New Issue
Block a user