mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
feat: add no-pull label for containers (#1574)
Co-authored-by: Nedžad Alibegović <nedzad@nedzad.dev> Co-authored-by: nils måsén <nils@piksel.se>
This commit is contained in:
parent
6ace7bd0dd
commit
bbbe04119c
5 changed files with 66 additions and 13 deletions
|
|
@ -280,7 +280,7 @@ func (client dockerClient) RenameContainer(c Container, newName string) error {
|
|||
func (client dockerClient) IsContainerStale(container Container) (stale bool, latestImage t.ImageID, err error) {
|
||||
ctx := context.Background()
|
||||
|
||||
if !client.PullImages {
|
||||
if !client.PullImages || container.IsNoPull() {
|
||||
log.Debugf("Skipping image pull.")
|
||||
} else if err := client.PullImage(ctx, container); err != nil {
|
||||
return false, container.SafeImageID(), err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue