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:
Gilbert Gilb's 2023-03-12 10:07:24 +01:00 committed by GitHub
parent 6ace7bd0dd
commit bbbe04119c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 66 additions and 13 deletions

View file

@ -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