The building stage fails with a "stream error" message similar to the following:
13-Jan-2025 13:59:24 app-build-f5a53-pod[step-build-and-push] INFO[0000] Building stage 'harbor.svc.example.com/public/nvidia-cuda:12.6.2-devel-ubuntu24.04' [idx: '0', base-idx: '-1']
13-Jan-2025 13:59:24 app-build-f5a53-pod[step-build-and-push] INFO[0000] Unpacking rootfs as cmd RUN apt-get update && apt-get install -y python3-pip python3.12-dev python3.12-venv && apt-get install -y g++ gcc && apt-get install -y --no-install-recommends ffmpeg libsm6 libxext6 libgl1 && apt-get clean && rm -rf /var/lib/apt/lists/* requires it.
13-Jan-2025 13:59:42 app-build-f5a53-pod[step-build-and-push] error building image: error building stage: failed to get filesystem from image: stream error: stream ID 19; NO_ERROR; received from peer
13-Jan-2025 13:59:42 app-build-f5a53-pod[step-write-image-ref] 2025/01/13 18:59:42 Skipping step because a previous step failed
This error can occur if you are pulling a large image and the proxy in front of your image registry has a short timeout. The above example is from a build that pulls an image from Harbor using the Contour ingress, which has a default timeout of 15 seconds.
Follow the documentation for your specific proxy to increase the timeout.
In this example using Contour ingress, adding the projectcontour.io/response-timeout: 5m
annotation resolved the issue.