Implement retry for image pull