ft: allow detect changes local images

This commit is contained in:
9bany 2023-09-06 10:00:45 +07:00
parent 36391b0ae7
commit 1f8e22ed91
4 changed files with 22 additions and 0 deletions

View file

@ -311,6 +311,10 @@ func (client dockerClient) RenameContainer(c t.Container, newName string) error
func (client dockerClient) IsContainerStale(container t.Container) (stale bool, latestImage t.ImageID, err error) {
ctx := context.Background()
if isLocalImage, checkErr := container.LocalImage(); checkErr && isLocalImage {
return client.HasNewImage(ctx, container)
}
if !client.PullImages || container.IsNoPull() {
log.Debugf("Skipping image pull.")
} else if err := client.PullImage(ctx, container); err != nil {