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 +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ import (
44
44
)
45
45
46
46
var json bool
47
- var isDaemon bool
48
47
49
48
var save bool
50
49
var types diffTypes
@@ -154,6 +153,7 @@ func getImageForName(imageName string) (pkgutil.Image, error) {
154
153
}
155
154
156
155
start := time .Now ()
156
+ // TODO(nkubala): specify gzip.NoCompression here when functional options are supported
157
157
img , err = daemon .Image (ref , & daemon.ReadOptions {
158
158
Buffer : true ,
159
159
})
@@ -162,7 +162,6 @@ func getImageForName(imageName string) (pkgutil.Image, error) {
162
162
}
163
163
elapsed := time .Now ().Sub (start )
164
164
logrus .Infof ("retrieving image from daemon took %f seconds" , elapsed .Seconds ())
165
- isDaemon = true
166
165
} else {
167
166
// either has remote prefix or has no prefix, in which case we force remote
168
167
imageName = strings .Replace (imageName , RemotePrefix , "" , - 1 )
@@ -232,10 +231,6 @@ func getImageForName(imageName string) (pkgutil.Image, error) {
232
231
}
233
232
234
233
func getExtractPathForImage (imageName string , image v1.Image ) (string , error ) {
235
- if isDaemon {
236
- // since we have to compress the image to get the digest, don't cache daemon images
237
- return getExtractPathForName (imageName )
238
- }
239
234
start := time .Now ()
240
235
digest , err := image .Digest ()
241
236
if err != nil {
You can’t perform that action at this time.
0 commit comments