@@ -30,7 +30,6 @@ import (
30
30
31
31
"github.com/containers/image/docker"
32
32
"github.com/containers/image/docker/tarfile"
33
- "github.com/containers/image/types"
34
33
"github.com/docker/docker/client"
35
34
36
35
"github.com/golang/glog"
@@ -134,23 +133,14 @@ func (p CloudPrepper) getFileSystem() (string, error) {
134
133
return "" , err
135
134
}
136
135
137
- // By default, the image library will try to look at /etc/docker/certs.d
138
- // As a non-root user, this would result in a permissions error, so we avoid this
139
- // by looking in a temporary directory we create in the container-diff home directory
140
- cwd , _ := os .Getwd ()
141
- tmpCerts , _ := ioutil .TempDir (cwd , "certs" )
142
- defer os .RemoveAll (tmpCerts )
143
- ctx := & types.SystemContext {
144
- DockerCertPath : tmpCerts ,
145
- }
146
- img , err := ref .NewImage (ctx )
136
+ img , err := ref .NewImage (nil )
147
137
if err != nil {
148
138
glog .Error (err )
149
139
return "" , err
150
140
}
151
141
defer img .Close ()
152
142
153
- imgSrc , err := ref .NewImageSource (ctx , nil )
143
+ imgSrc , err := ref .NewImageSource (nil , nil )
154
144
if err != nil {
155
145
glog .Error (err )
156
146
return "" , err
@@ -184,16 +174,7 @@ func (p CloudPrepper) getConfig() (ConfigSchema, error) {
184
174
return ConfigSchema {}, err
185
175
}
186
176
187
- // By default, the image library will try to look at /etc/docker/certs.d
188
- // As a non-root user, this would result in a permissions error, so we avoid this
189
- // by looking in a temporary directory we create in the container-diff home directory
190
- cwd , _ := os .Getwd ()
191
- tmpCerts , _ := ioutil .TempDir (cwd , "certs" )
192
- defer os .RemoveAll (tmpCerts )
193
- ctx := & types.SystemContext {
194
- DockerCertPath : tmpCerts ,
195
- }
196
- img , err := ref .NewImage (ctx )
177
+ img , err := ref .NewImage (nil )
197
178
if err != nil {
198
179
glog .Errorf ("Error referencing image %s from registry: %s" , p .Source , err )
199
180
return ConfigSchema {}, errors .New ("Could not obtain image config" )
0 commit comments