code: func WaitInspectWithArgs(dockerBinary, name, expr, expected string, timeout time.Duration, arg ...string) error {
  	after := time.After(timeout)
  
  	args := append(arg, "inspect", "-f", expr, name)
  	for {
  		result := icmd.RunCommand(dockerBinary, args...)
  		if result.Error != nil {
  			if !strings.Contains(strings.ToLower(result.Stderr()), "no such") {
  				return errors.Errorf("error executing docker inspect: %v\n%s",
  					result.Stderr(), result.Stdout())
  			}
  			select {
  			case <-after:
  				return result.Error
  			default:
  				time.Sleep(10 * time.Millisecond)
  				continue
  			}
  		}
  
  		out := strings.TrimSpace(result.Stdout())
  		if out == expected {
  			break
  		}
  
  		select {
  		case <-after:
  			return errors.Errorf("condition \"%q == %q\" not true in time (%v)", out, expected, timeout)
  		default:
  		}
  
  		time.Sleep(100 * time.Millisecond)
  	}
  	return nil
  }
docs: // WaitInspectWithArgs waits for the specified expression to be equals to the specified expected string in the given time.
  // Deprecated: use cli.WaitCmd instead