-
Notifications
You must be signed in to change notification settings - Fork 75
/
rbe_configs_gen_skip_pull.diff
32 lines (31 loc) · 1.84 KB
/
rbe_configs_gen_skip_pull.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
diff --git a/pkg/rbeconfigsgen/rbeconfigsgen.go b/pkg/rbeconfigsgen/rbeconfigsgen.go
index a752642..7ec3c75 100644
--- a/pkg/rbeconfigsgen/rbeconfigsgen.go
+++ b/pkg/rbeconfigsgen/rbeconfigsgen.go
@@ -260,16 +260,17 @@ func newDockerRunner(containerImage string, stopContainer bool) (*dockerRunner,
stopContainer: stopContainer,
dockerPath: "docker",
}
- if _, err := runCmd(d.dockerPath, "pull", d.containerImage); err != nil {
- return nil, fmt.Errorf("docker was unable to pull the toolchain container image %q: %w", d.containerImage, err)
- }
- resolvedImage, err := runCmd(d.dockerPath, "inspect", "--format={{index .RepoDigests 0}}", d.containerImage)
- if err != nil {
- return nil, fmt.Errorf("failed to convert toolchain container image %q into a fully qualified image name by digest: %w", d.containerImage, err)
- }
- resolvedImage = strings.TrimSpace(resolvedImage)
- log.Printf("Resolved toolchain image %q to fully qualified reference %q.", d.containerImage, resolvedImage)
- d.resolvedImage = resolvedImage
+ // No need for this. We use Skopeo.
+ // if _, err := runCmd(d.dockerPath, "pull", d.containerImage); err != nil {
+ // return nil, fmt.Errorf("docker was unable to pull the toolchain container image %q: %w", d.containerImage, err)
+ // }
+ // resolvedImage, err := runCmd(d.dockerPath, "inspect", "--format={{index .RepoDigests 0}}", d.containerImage)
+ // if err != nil {
+ // return nil, fmt.Errorf("failed to convert toolchain container image %q into a fully qualified image name by digest: %w", d.containerImage, err)
+ // }
+ // resolvedImage = strings.TrimSpace(resolvedImage)
+ // log.Printf("Resolved toolchain image %q to fully qualified reference %q.", d.containerImage, resolvedImage)
+ d.resolvedImage = d.containerImage
cid, err := runCmd(d.dockerPath, "create", "--rm", d.resolvedImage, "sleep", "infinity")
if err != nil {