This repository was archived by the owner on Mar 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ import (
44
44
)
45
45
46
46
var json bool
47
+ var isDaemon bool
47
48
48
49
var save bool
49
50
var types diffTypes
@@ -161,8 +162,7 @@ func getImageForName(imageName string) (pkgutil.Image, error) {
161
162
}
162
163
elapsed := time .Now ().Sub (start )
163
164
logrus .Infof ("retrieving image from daemon took %f seconds" , elapsed .Seconds ())
164
- // TODO(nkubala): remove this when we can set compression level in containerregistry
165
- noCache = true // force noCache if image is in daemon
165
+ isDaemon = true
166
166
} else {
167
167
// either has remote prefix or has no prefix, in which case we force remote
168
168
imageName = strings .Replace (imageName , RemotePrefix , "" , - 1 )
@@ -232,7 +232,8 @@ func getImageForName(imageName string) (pkgutil.Image, error) {
232
232
}
233
233
234
234
func getExtractPathForImage (imageName string , image v1.Image ) (string , error ) {
235
- if noCache {
235
+ if isDaemon {
236
+ // since we have to compress the image to get the digest, don't cache daemon images
236
237
return getExtractPathForName (imageName )
237
238
}
238
239
start := time .Now ()
You can’t perform that action at this time.
0 commit comments