Closed julienvey closed 9 years ago
Currently, the code when running update is
log.Printf("Pulling Bazooka images to check for new versions\n") mandatoryImages := []string{"server", "web", "orchestration", "parser"} optionalImages := []string{"parser-java", "parser-golang", "scm-git", "runner-java", "runner-java:oraclejdk8", "runner-java:oraclejdk7", "runner-java:oraclejdk6", "runner java:openjdk8", "runner java:openjdk7", "runner-java:openjdk6", "runner-golang", "runner-golang:1.2.2", "runner-golang:1.3", "runner-golang:1.3.1", "runner-golang:1.3.2", "runner-golang:1.3.3", "runner-golang:1.4"} for _, image := range mandatoryImages { err = client.Pull(&docker.PullOptions{Image: getImageLocation(*registry, fmt.Sprintf("bazooka/%s", image))}) if err != nil { log.Fatal(fmt.Errorf("Unable to pull required image for Bazooka, reason is: %v\n", err)) } } for _, image := range optionalImages { err = client.Pull(&docker.PullOptions{Image: getImageLocation(*registry, fmt.Sprintf("bazooka/%s", image))}) if err != nil { log.Printf("Unable to pull image for Bazooka, as it is an optional one, let's move on. Reason is: %v\n", err) } }
It tries to docker pull all mandatory images and optional images, even if these images where never downloaded
docker pull
What I propose is:
This way, it will only docker pull images that were already present on the system
Could be done with #173
Currently, the code when running update is
It tries to
docker pull
all mandatory images and optional images, even if these images where never downloadedWhat I propose is:
docker pull
the resultThis way, it will only
docker pull
images that were already present on the system