@@ -44,15 +44,15 @@ func getDefaultPlatform() *v1.Platform {
44
44
}
45
45
46
46
// ImageExists checks if an image exists locally in the daemon or remotely in the registry
47
- func (* RegistryImageManager ) ImageExists (_ context.Context , imageName string ) (bool , error ) {
47
+ func (r * RegistryImageManager ) ImageExists (_ context.Context , imageName string ) (bool , error ) {
48
48
// Parse the image reference
49
49
ref , err := name .ParseReference (imageName )
50
50
if err != nil {
51
51
return false , fmt .Errorf ("failed to parse image reference %q: %w" , imageName , err )
52
52
}
53
53
54
54
// First check if image exists locally in daemon
55
- if _ , err := daemon .Image (ref ); err != nil {
55
+ if _ , err := daemon .Image (ref , daemon . WithClient ( r . dockerClient ) ); err != nil {
56
56
// Image does not exist locally
57
57
return false , nil
58
58
}
@@ -97,7 +97,7 @@ func (r *RegistryImageManager) PullImage(ctx context.Context, imageName string)
97
97
}
98
98
99
99
// Save the image to the local daemon
100
- response , err := daemon .Write (tag , img )
100
+ response , err := daemon .Write (tag , img , daemon . WithClient ( r . dockerClient ) )
101
101
if err != nil {
102
102
return fmt .Errorf ("failed to write image to daemon: %w" , err )
103
103
}
0 commit comments