Closes #63869. Perform `docker pull` explicitly instead of as part of `docker build`, and wrap it in a retry loop. This is an attempt to make the build more resilient to transient errors.