Commit c42712d0 authored by duanjinfei's avatar duanjinfei

update pull image

parent 542d739f
...@@ -277,10 +277,7 @@ func (d *DockerOp) PsImageNameMap() (map[string]bool, error) { ...@@ -277,10 +277,7 @@ func (d *DockerOp) PsImageNameMap() (map[string]bool, error) {
} }
func (d *DockerOp) PullImage(info *models.ModelInfo) { func (d *DockerOp) PullImage(info *models.ModelInfo) {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) out, err := d.dockerClient.ImagePull(context.Background(), info.ImageName, types.ImagePullOptions{})
defer cancel()
out, err := d.dockerClient.ImagePull(ctx, info.ImageName, types.ImagePullOptions{})
if err != nil { if err != nil {
log.Errorf("Error pulling image from %s: %v", info.ImageName, err) log.Errorf("Error pulling image from %s: %v", info.ImageName, err)
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment