mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Merge pull request #85478 from bart0sh/PR0084-e2e_node-inspect-inspect-image-before-pulling
e2e_node: check if image exists locally before pulling
This commit is contained in:
commit
0e072a8214
@ -98,7 +98,11 @@ func (dp *dockerPuller) Name() string {
|
||||
}
|
||||
|
||||
func (dp *dockerPuller) Pull(image string) ([]byte, error) {
|
||||
return exec.Command("docker", "pull", image).CombinedOutput()
|
||||
// TODO(random-liu): Use docker client to get rid of docker binary dependency.
|
||||
if exec.Command("docker", "inspect", "--type=image", image).Run() != nil {
|
||||
return exec.Command("docker", "pull", image).CombinedOutput()
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
type remotePuller struct {
|
||||
|
Loading…
Reference in New Issue
Block a user