File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -278,13 +278,17 @@ func setupVm(
278
278
) error {
279
279
imageName := fmt .Sprintf ("%s:%s" , version .SetupImage , version .Version )
280
280
281
- pullStream , err := dockerCli .ImagePull (ctx , imageName , types. ImagePullOptions {} )
281
+ _ , _ , err := dockerCli .ImageInspectWithRaw (ctx , imageName )
282
282
if err != nil {
283
- fmt .Errorf ("Failed to create container" )
284
- return err
285
- }
283
+ fmt .Printf ("Image doesn't exist locally. Pulling...\n " )
284
+
285
+ pullStream , err := dockerCli .ImagePull (ctx , imageName , types.ImagePullOptions {})
286
+ if err != nil {
287
+ return fmt .Errorf ("failed to pull setup image: %w" , err )
288
+ }
286
289
287
- io .Copy (os .Stdout , pullStream )
290
+ io .Copy (os .Stdout , pullStream )
291
+ }
288
292
289
293
resp , err := dockerCli .ContainerCreate (ctx , & container.Config {
290
294
Image : imageName ,
You can’t perform that action at this time.
0 commit comments