Documentation
¶
Overview ¶
Package updater keeps Docker containers running current images: it pulls newer images, recreates the containers using them, and restarts whatever depended on those containers.
Getting started ¶
Everything runs through a Service. The zero Config is valid and produces a service backed entirely by the local Docker environment:
service, err := updater.New(updater.Config{})
if err != nil {
return err
}
defer service.Close()
result, err := service.UpdateContainer(ctx, containerID, updater.Options{})
Service.UpdateContainer updates one container by ID. Service.ApplyPending works through every update recorded in the configured PendingStore, and restarts the containers still running the images it replaced.
Configuring ¶
Each field of Config is a seam the host application can take over. Leave a field nil and the updater supplies a Docker-backed default for it — or, for the purely optional ones, simply skips the behavior. So a caller can replace just the pieces they care about:
service, err := updater.New(updater.Config{
PendingStore: myStore, // where pending updates come from
Notifier: myNotifier, // told about each successful update
SelfUpdater: myUpgrader, // handles the container we run in
})
LabelPolicy decides which containers are in scope, using container labels. It merges per field, so overriding one behavior keeps the defaults for the rest. See DefaultLabelPolicy.
Compose and self-update ¶
Containers carrying Docker Compose labels are grouped by project and updated through the configured ProjectUpdater rather than being recreated individually, then verified to no longer run the old image. Containers the LabelPolicy marks as self-update targets — including the one named by Config.SelfContainerID — are handed to the configured SelfUpdater instead, last in the run, since updating them may stop this process.
Building ¶
This module uses the experimental encoding/json/v2 package. Build and test it with GOEXPERIMENT=jsonv2 set.
Index ¶
- Constants
- Variables
- func NewRegistryTagLister() types.RegistryTagLister
- type ComposeProject
- type Config
- type ConfigError
- type DockerClient
- type DockerClientProvider
- type Event
- type EventRecorder
- type ImagePuller
- type ImageUpdateRecord
- type LabelPolicy
- func (p LabelPolicy) IsAgent(containerLabels map[string]string) bool
- func (p LabelPolicy) IsSelfUpdateTarget(containerLabels map[string]string) bool
- func (p LabelPolicy) IsServer(containerLabels map[string]string) bool
- func (p LabelPolicy) IsSwarmTask(containerLabels map[string]string) bool
- func (p LabelPolicy) IsUpdateDisabled(containerLabels map[string]string) bool
- func (p LabelPolicy) Merge(o LabelPolicy) LabelPolicy
- func (p LabelPolicy) StopSignal(containerLabels map[string]string) string
- func (p LabelPolicy) TagPolicy(containerLabels map[string]string) types.Policy
- func (p LabelPolicy) UnmanagedReason(containerLabels map[string]string) string
- type Notification
- type Notifier
- type Options
- type PendingStore
- type ProjectUpdater
- type RegistryDigestResolver
- type ResourceResult
- type ResourceStatus
- type ResourceType
- type RestartTargets
- type Result
- type RunRecorder
- type SelfUpdateTarget
- type SelfUpdater
- type Service
- func (s *Service) ApplyPending(ctx context.Context, opts Options) (out *Result, err error)
- func (s *Service) BeginContainerUpdate(containerID string) (func(), error)
- func (s *Service) BeginProjectUpdate(projectID string) func()
- func (s *Service) CheckContainerUpdate(ctx context.Context, containerID string) (types.CheckResult, error)
- func (s *Service) CheckImageUpdate(ctx context.Context, request types.CheckRequest) (types.CheckResult, error)
- func (s *Service) Close() error
- func (s *Service) RestartContainersUsingOldImages(ctx context.Context, targets RestartTargets) ([]ResourceResult, error)
- func (s *Service) Status() Status
- func (s *Service) UpdateContainer(ctx context.Context, containerID string, opts Options) (out *Result, err error)
- type SettingsProvider
- type Status
- type UpdateType
- type UsedImageCollector
- type UsedImageCollectorFunc
Examples ¶
Constants ¶
const ( // UpdateTypeDigest identifies an image update where the tag is unchanged but the digest changed. UpdateTypeDigest UpdateType = "digest" // UpdateTypeTag identifies an image update where the target tag changes. UpdateTypeTag UpdateType = "tag" // ResourceTypeImage is the result resource type for image pull/check work. ResourceTypeImage ResourceType = "image" // ResourceTypeContainer is the result resource type for container update work. ResourceTypeContainer ResourceType = "container" // ResourceTypeProject is the result resource type for compose project update work. ResourceTypeProject ResourceType = "project" // StatusChecked indicates a resource was checked. StatusChecked ResourceStatus = "checked" // StatusUpdated indicates a resource was updated. StatusUpdated ResourceStatus = "updated" // StatusRestarted indicates a resource was restarted because a dependency changed. StatusRestarted ResourceStatus = "restarted" // StatusSkipped indicates a resource was skipped. StatusSkipped ResourceStatus = "skipped" // StatusFailed indicates a resource failed to update. StatusFailed ResourceStatus = "failed" // StatusUpToDate indicates a resource is already up to date. StatusUpToDate ResourceStatus = "up_to_date" // StatusUpdateAvailable indicates an update is available. StatusUpdateAvailable ResourceStatus = "update_available" )
Variables ¶
var ( // ErrDockerClientProviderRequired is returned when no Docker client // provider is configured. ErrDockerClientProviderRequired = errors.New("docker client provider is required") // ErrImagePullerRequired is returned when an update needs to pull an image // but no image puller is configured. ErrImagePullerRequired = errors.New("image puller is required") // ErrPendingStoreRequired is returned by ApplyPending when no pending store // is configured. ErrPendingStoreRequired = errors.New("pending store is required") // ErrSelfUpdaterRequired is returned when a container must be handled by // the host application but no SelfUpdater is configured. ErrSelfUpdaterRequired = errors.New("self-update requires a SelfUpdater") // ErrSelfUpdateContainer is returned when a self-update target reaches the // standalone recreate path, which must never recreate it. ErrSelfUpdateContainer = errors.New("self-update containers must use SelfUpdater") // ErrNilDockerClient is returned when the configured provider hands back a // nil Docker client. ErrNilDockerClient = errors.New("docker client unavailable") // ErrContainerNotFound is returned when the requested container does not // exist. Use errors.Is to detect it; the returned error names the container. ErrContainerNotFound = errors.New("container not found") // ErrUpdateInProgress is returned by BeginContainerUpdate, and reported as a skip reason, while // another update holds the same container. ErrUpdateInProgress = errors.New("container update already in progress") )
Functions ¶
func NewRegistryTagLister ¶
func NewRegistryTagLister() types.RegistryTagLister
NewRegistryTagLister lists registry tags using local Docker credentials.
Types ¶
type ComposeProject ¶
ComposeProject identifies a compose project known to the host application.
type Config ¶
type Config struct {
// DockerClientProvider supplies the Docker client every operation uses. Defaults to
// NewDockerClientProvider(), which reads the standard Docker environment variables.
DockerClientProvider DockerClientProvider
// ImagePuller pulls images. Defaults to NewImagePuller(DockerClientProvider).
ImagePuller ImagePuller
// PendingStore supplies the pending updates ApplyPending works through.
// Defaults to NewMemoryPendingStore(), which starts empty.
PendingStore PendingStore
// RegistryDigestResolver checks registries for newer digests. Defaults to
// NewRegistryDigestResolver(), which uses the local Docker credentials.
RegistryDigestResolver RegistryDigestResolver
// RegistryTagLister discovers version tags. Defaults to Docker-config credentials.
RegistryTagLister types.RegistryTagLister
// ProjectUpdater updates Docker Compose services. Defaults to
// NewDockerComposeProjectUpdater(DockerClientProvider), which runs the docker compose CLI.
ProjectUpdater ProjectUpdater
// LabelPolicy decides which containers the updater may touch. New merges it over
// DefaultLabelPolicy, so each nil func keeps the default; UnmanagedReasonFunc has none.
LabelPolicy LabelPolicy
// RunRecorder is optional; when nil, per-resource results are not recorded.
RunRecorder RunRecorder
// Settings is optional; when nil, no containers are excluded.
Settings SettingsProvider
// SelfUpdater is optional. When nil, containers that need host self-update
// handling fail with an error instead of being updated.
SelfUpdater SelfUpdater
// Notifier is optional; when nil, successful updates are not announced.
Notifier Notifier
// EventRecorder is optional; when nil, lifecycle events are dropped.
EventRecorder EventRecorder
// UsedImageCollector is optional. When nil, ApplyPending discovers active
// images by listing running containers.
UsedImageCollector UsedImageCollector
// TagCandidateFilter is optional; when nil, every selected tag is used.
TagCandidateFilter types.TagCandidateFilter
// Logger receives the updater's diagnostics. Defaults to slog.Default().
Logger *slog.Logger
// SelfContainerID is the ID (or ID prefix) of the container the host application runs in.
// When set, that container always goes through the SelfUpdater, whatever its labels.
SelfContainerID string
// OperationTimeout optionally bounds individual Docker mutation operations
// and compose project updates. Zero leaves caller context deadlines unchanged.
OperationTimeout time.Duration
}
Config configures a Service. Every field is optional: New fills in a Docker-backed default for each port that has one, and a nil optional port disables the behavior it provides.
type ConfigError ¶
type ConfigError struct {
// Reason is the underlying cause.
Reason error
// Field is the Config field at fault, as written in Go source.
Field string
}
ConfigError reports a Config field that New could not accept.
func (*ConfigError) Unwrap ¶
func (e *ConfigError) Unwrap() error
Unwrap returns the underlying cause, so errors.Is can match the sentinel.
type DockerClient ¶
type DockerClient struct {
// contains filtered or unexported fields
}
DockerClient is the built-in DockerClientProvider: it lazily opens one client, pings it on every hand-out, and reconnects after the daemon goes away. Construct one with NewDockerClientProvider.
func NewDockerClientProvider ¶
func NewDockerClientProvider(options ...client.Opt) *DockerClient
NewDockerClientProvider returns a provider for the local Docker environment plus options. The caller owns it and should Close it, unless New built it, in which case Service.Close does.
func (*DockerClient) Close ¶
func (p *DockerClient) Close() error
Close shuts down the Docker client, if one is open. It is safe to call more than once, and a later DockerClient call opens a fresh connection.
func (*DockerClient) DockerClient ¶
DockerClient returns a live Docker client, opening or reopening one as needed. It implements DockerClientProvider.
type DockerClientProvider ¶
DockerClientProvider provides Docker clients. The provider owns their lifecycle, so Service never closes them, and it may return the same client across calls.
type Event ¶
type Event struct {
Metadata map[string]any
Phase string
Severity string
ResourceID string
ResourceName string
ResourceType ResourceType
}
Event describes a generic updater event for host applications.
type EventRecorder ¶
EventRecorder receives updater lifecycle events.
type ImagePuller ¶
type ImagePuller interface {
PullImage(ctx context.Context, imageRef string, progress io.Writer) error
}
ImagePuller pulls images and may write progress to progress. A nil progress writer means the caller does not want progress output.
func NewImagePuller ¶
func NewImagePuller(provider DockerClientProvider) ImagePuller
NewImagePuller returns an image puller backed by Docker's ImagePull API.
type ImageUpdateRecord ¶
type ImageUpdateRecord struct {
LatestVersion *string
CurrentDigest *string
LatestDigest *string
LastError *string
CheckTime time.Time
// ContainerID scopes this record to one container; ID remains the image/store ID.
ContainerID string
ID string
Repository string
Tag string
UpdateType UpdateType
CurrentVersion string
HasUpdate bool
}
ImageUpdateRecord is a pending image update known to a caller-provided store.
func (ImageUpdateRecord) ImageRef ¶
func (i ImageUpdateRecord) ImageRef() string
ImageRef returns the current image reference represented by the record.
func (ImageUpdateRecord) IsDigestUpdate ¶
func (i ImageUpdateRecord) IsDigestUpdate() bool
IsDigestUpdate reports whether the update is digest-based.
func (ImageUpdateRecord) IsTagUpdate ¶
func (i ImageUpdateRecord) IsTagUpdate() bool
IsTagUpdate reports whether the update is tag-based.
func (ImageUpdateRecord) NeedsUpdate ¶
func (i ImageUpdateRecord) NeedsUpdate() bool
NeedsUpdate reports whether the record indicates a pending update.
func (ImageUpdateRecord) NewImageRef ¶
func (i ImageUpdateRecord) NewImageRef() string
NewImageRef returns the image reference the updater should pull for the record.
type LabelPolicy ¶
type LabelPolicy struct {
TagPolicyFunc func(map[string]string) types.Policy
IsUpdateDisabledFunc func(map[string]string) bool
IsSelfUpdateTargetFunc func(map[string]string) bool
IsAgentFunc func(map[string]string) bool
IsServerFunc func(map[string]string) bool
IsSwarmTaskFunc func(map[string]string) bool
StopSignalFunc func(map[string]string) string
UnmanagedReasonFunc func(map[string]string) string
}
LabelPolicy decides from a container's labels whether the updater may touch it, whether the host must update it itself, and how to stop it. New fills nil funcs from DefaultLabelPolicy.
func DefaultLabelPolicy ¶
func DefaultLabelPolicy() LabelPolicy
DefaultLabelPolicy returns the Arcane-compatible label behavior New uses for any field a caller leaves nil. It sets no UnmanagedReasonFunc, so by default no container is reported as managed by another tool.
func (LabelPolicy) IsAgent ¶
func (p LabelPolicy) IsAgent(containerLabels map[string]string) bool
IsAgent reports whether labels identify an agent self-update target.
func (LabelPolicy) IsSelfUpdateTarget ¶
func (p LabelPolicy) IsSelfUpdateTarget(containerLabels map[string]string) bool
IsSelfUpdateTarget reports whether labels require host self-update handling.
func (LabelPolicy) IsServer ¶
func (p LabelPolicy) IsServer(containerLabels map[string]string) bool
IsServer reports whether labels identify a server self-update target.
func (LabelPolicy) IsSwarmTask ¶
func (p LabelPolicy) IsSwarmTask(containerLabels map[string]string) bool
IsSwarmTask reports whether labels identify a Docker Swarm task container.
func (LabelPolicy) IsUpdateDisabled ¶
func (p LabelPolicy) IsUpdateDisabled(containerLabels map[string]string) bool
IsUpdateDisabled reports whether labels opt the container out of updates.
func (LabelPolicy) Merge ¶
func (p LabelPolicy) Merge(o LabelPolicy) LabelPolicy
Merge returns p with every non-nil func from o laid over it. Neither p nor o is changed, so DefaultLabelPolicy().Merge(custom) overrides only the behaviors custom sets.
func (LabelPolicy) StopSignal ¶
func (p LabelPolicy) StopSignal(containerLabels map[string]string) string
StopSignal returns the configured stop signal for a container, or "" when the policy declares none.
func (LabelPolicy) TagPolicy ¶
func (p LabelPolicy) TagPolicy(containerLabels map[string]string) types.Policy
TagPolicy returns the image selection policy for a container.
func (LabelPolicy) UnmanagedReason ¶
func (p LabelPolicy) UnmanagedReason(containerLabels map[string]string) string
UnmanagedReason reports why another tool owns the container's updates, or "" when the updater may.
type Notification ¶
type Notification struct {
ContainerID string
ContainerName string
ImageRef string
OldImage string
NewImage string
}
Notification describes a successful container update notification.
type Notifier ¶
type Notifier interface {
Notify(ctx context.Context, notification Notification) error
}
Notifier receives successful update notifications.
type Options ¶
type Options struct {
// Force applies updates even when the digest check says the image is
// already current.
Force bool `json:"forceUpdate,omitempty"`
// DryRun reports what would be updated without pulling or recreating
// anything.
DryRun bool `json:"dryRun,omitempty"`
// IgnoreSettingsExclusions lets a user-requested run update the containers it targets despite a settings
// exclusion or updater opt-out label. Implicit dependency restarts still honor both, and Swarm, unmanaged,
// and immutability checks still apply.
IgnoreSettingsExclusions bool `json:"ignoreSettingsExclusions,omitempty"`
}
Options configures an updater run.
type PendingStore ¶
type PendingStore interface {
PendingImageUpdates(ctx context.Context) ([]ImageUpdateRecord, error)
ClearImageUpdateRecord(ctx context.Context, record ImageUpdateRecord) error
}
PendingStore provides pending update records and clears applied records.
func NewMemoryPendingStore ¶
func NewMemoryPendingStore(records ...ImageUpdateRecord) PendingStore
NewMemoryPendingStore returns an in-memory pending update store.
type ProjectUpdater ¶
type ProjectUpdater interface {
ProjectByComposeName(ctx context.Context, composeName string) (ComposeProject, error)
UpdateServices(ctx context.Context, projectID string, services []string) error
}
ProjectUpdater updates Docker Compose services owned by a host application.
func NewDockerComposeProjectUpdater ¶
func NewDockerComposeProjectUpdater(provider DockerClientProvider) ProjectUpdater
NewDockerComposeProjectUpdater returns a Docker Compose CLI project updater.
type RegistryDigestResolver ¶
type RegistryDigestResolver interface {
ImageDigest(ctx context.Context, imageRef string) (string, error)
}
RegistryDigestResolver resolves an image's current digest from its registry, without pulling it.
func NewRegistryDigestResolver ¶
func NewRegistryDigestResolver() RegistryDigestResolver
NewRegistryDigestResolver returns a registry HTTP digest resolver.
type ResourceResult ¶
type ResourceResult struct {
ResourceID string `json:"resourceId"`
ResourceName string `json:"resourceName,omitempty"`
ResourceType ResourceType `json:"resourceType"`
Status ResourceStatus `json:"status"`
OldImage string `json:"oldImage,omitempty"`
NewImage string `json:"newImage,omitempty"`
Details map[string]any `json:"details,omitempty"`
Error string `json:"error,omitempty"`
UpdateAvailable bool `json:"updateAvailable,omitempty"`
UpdateApplied bool `json:"updateApplied,omitempty"`
}
ResourceResult represents the result of an update operation on one resource.
type ResourceStatus ¶
type ResourceStatus string
ResourceStatus is the outcome recorded for one resource in a run. It is distinct from Status, which reports the work a Service has in flight.
type ResourceType ¶
type ResourceType string
ResourceType names the kind of thing a ResourceResult describes.
type RestartTargets ¶
type RestartTargets struct {
// ByOldID maps a replaced image ID to the ref its containers move to.
ByOldID map[string]string
// ByOldRef maps a replaced image ref to the ref its containers move to.
ByOldRef map[string]string
// IgnoreSettingsExclusions restarts matching containers despite a settings exclusion or updater
// opt-out label, as Options.IgnoreSettingsExclusions does for a run.
IgnoreSettingsExclusions bool
}
RestartTargets selects the running containers RestartContainersUsingOldImages restarts.
type Result ¶
type Result struct {
StartTime time.Time `json:"startTime,omitzero"`
EndTime time.Time `json:"endTime,omitzero"`
Items []ResourceResult `json:"items"`
Checked int `json:"checked"`
Updated int `json:"updated"`
Restarted int `json:"restarted,omitempty"`
Skipped int `json:"skipped"`
Failed int `json:"failed"`
Success bool `json:"success,omitempty"`
}
Result represents a complete updater run.
type RunRecorder ¶
type RunRecorder interface {
RecordUpdateRun(ctx context.Context, result ResourceResult) error
}
RunRecorder records per-resource updater results.
type SelfUpdateTarget ¶
type SelfUpdateTarget struct {
ContainerID string
ContainerName string
InstanceType string
Labels map[string]string
// NewImageRef is the resolved image reference the self-updater should
// upgrade the container to. Empty when the updater could not resolve one.
NewImageRef string
// PullImageRef is an immutable reference the host froze the update to; the container is still
// recreated as NewImageRef. Empty when the host pulls NewImageRef directly.
PullImageRef string
}
SelfUpdateTarget describes a container that should be handled by a host self-updater.
type SelfUpdater ¶
type SelfUpdater interface {
TriggerSelfUpdate(ctx context.Context, target SelfUpdateTarget) error
}
SelfUpdater handles host-specific self-update targets: containers the updater must not recreate itself, typically because the host application runs in one.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service coordinates Docker image updates, container recreation, and the host adapters configured through Config. A Service is safe for concurrent use.
func New ¶
New constructs an updater service; the zero Config is valid and uses the local Docker environment. Nil ports get their Docker-backed defaults and Config.LabelPolicy is merged over DefaultLabelPolicy.
Example ¶
The zero Config gives a service backed entirely by the local Docker environment.
service, err := New(Config{})
if err != nil {
log.Fatal(err)
}
defer func() {
if closeErr := service.Close(); closeErr != nil {
log.Print(closeErr)
}
}()
result, err := service.UpdateContainer(context.Background(), "my-container-id", Options{})
if err != nil {
log.Print(err)
return
}
fmt.Printf("updated %d of %d containers in %s\n", result.Updated, result.Checked, result.Duration())
func (*Service) ApplyPending ¶
ApplyPending applies pending image updates from the configured PendingStore.
Example ¶
ApplyPending works through the updates a PendingStore reports, then restarts the containers still running the images it replaced.
store := NewMemoryPendingStore(ImageUpdateRecord{
ID: "sha256:old-image-id",
Repository: "nginx",
Tag: "1.27",
HasUpdate: true,
UpdateType: UpdateTypeDigest,
})
service, err := New(Config{PendingStore: store})
if err != nil {
log.Fatal(err)
}
defer func() {
if closeErr := service.Close(); closeErr != nil {
log.Print(closeErr)
}
}()
// DryRun reports what would change without pulling or recreating anything.
result, err := service.ApplyPending(context.Background(), Options{DryRun: true})
if err != nil {
log.Print(err)
return
}
for _, item := range result.Items {
fmt.Printf("%s %s: %s -> %s\n", item.ResourceType, item.Status, item.OldImage, item.NewImage)
}
func (*Service) BeginContainerUpdate ¶
BeginContainerUpdate claims a container for updating and returns the callback that releases it. It returns ErrUpdateInProgress, with a no-op callback, while another update holds the same container.
func (*Service) BeginProjectUpdate ¶
BeginProjectUpdate marks a project as updating and returns a completion callback.
func (*Service) CheckContainerUpdate ¶
func (s *Service) CheckContainerUpdate(ctx context.Context, containerID string) (types.CheckResult, error)
CheckContainerUpdate inspects one container and returns its current policy's candidate. It does not write pending records or change Docker resources.
func (*Service) CheckImageUpdate ¶
func (s *Service) CheckImageUpdate(ctx context.Context, request types.CheckRequest) (types.CheckResult, error)
CheckImageUpdate discovers an image update without pulling or changing state. CurrentDigest should describe the image in use, not a separately cached tag.
func (*Service) Close ¶
Close releases the Docker client New created; a caller-supplied provider is left to its owner. Close is idempotent.
func (*Service) RestartContainersUsingOldImages ¶
func (s *Service) RestartContainersUsingOldImages(ctx context.Context, targets RestartTargets) ([]ResourceResult, error)
RestartContainersUsingOldImages restarts running containers matching targets' old image IDs or refs, plus their dependents. A dependency cycle falls back to discovery order.
type SettingsProvider ¶
SettingsProvider provides updater settings owned by the host application.
type Status ¶
type Status struct {
ContainerIDs []string `json:"containerIds"`
ProjectIDs []string `json:"projectIds"`
UpdatingContainers int `json:"updatingContainers"`
UpdatingProjects int `json:"updatingProjects"`
}
Status reports resources that are actively being updated by this service instance.
type UpdateType ¶
type UpdateType string
UpdateType distinguishes the two kinds of image update the updater applies.
type UsedImageCollector ¶
UsedImageCollector allows callers to provide their own active-image discovery, replacing the default container-list scan.
type UsedImageCollectorFunc ¶
UsedImageCollectorFunc adapts a function to UsedImageCollector.
func (UsedImageCollectorFunc) UsedImages ¶
func (f UsedImageCollectorFunc) UsedImages(ctx context.Context) (map[string]struct{}, error)
UsedImages calls f(ctx).
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package digest parses and canonicalizes the OCI content digests that identify an exact image, independent of the tag pointing at it.
|
Package digest parses and canonicalizes the OCI content digests that identify an exact image, independent of the tag pointing at it. |
|
internal
|
|
|
compose
Package compose defines the additional Docker Compose label keys the updater relies on beyond the project and service labels in kit.getarcane.app/docker.
|
Package compose defines the additional Docker Compose label keys the updater relies on beyond the project and service labels in kit.getarcane.app/docker. |
|
digestcheck
Package digestcheck compares local image digests with registry digests, so the updater can tell a real update from a no-op re-pull.
|
Package digestcheck compares local image digests with registry digests, so the updater can tell a real update from a no-op re-pull. |
|
Package labels reads the container labels that tell the updater whether a container opts out, is an Arcane server or agent that updates itself, belongs to Swarm, and how it wants to be stopped.
|
Package labels reads the container labels that tell the updater whether a container opts out, is an Arcane server or agent that updates itself, belongs to Swarm, and how it wants to be stopped. |
|
pkg
|
|
|
utils/tagpolicy
Package tagpolicy selects newer image tags using semantic version policies.
|
Package tagpolicy selects newer image tags using semantic version policies. |
|
Package refs normalizes image references so every spelling of one image ("nginx", "nginx:latest", "docker.io/library/nginx:latest") compares equal, and flags references that cannot be updated.
|
Package refs normalizes image references so every spelling of one image ("nginx", "nginx:latest", "docker.io/library/nginx:latest") compares equal, and flags references that cannot be updated. |
|
Package registry talks to container registries through go-containerregistry to list tags, resolve image digests and read pull rate limits.
|
Package registry talks to container registries through go-containerregistry to list tags, resolve image digests and read pull rate limits. |
|
Package types contains tag update policies and adapter contracts.
|
Package types contains tag update policies and adapter contracts. |