This repository was archived by the owner on May 28, 2025. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
123123      build_args+=(" --build-arg"   " SCRIPT_ARG=${DOCKER_SCRIPT} "  )
124124    fi 
125125
126+     GHCR_BUILDKIT_IMAGE=" ghcr.io/rust-lang/buildkit:buildx-stable-1" 
126127    #  On non-CI jobs, we try to download a pre-built image from the rust-lang-ci
127128    #  ghcr.io registry. If it is not possible, we fall back to building the image
128129    #  locally.
@@ -140,7 +141,9 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
140141    elif  [[ " $PR_CI_JOB "   ==  " 1"   ]]; 
141142    then 
142143        #  Enable a new Docker driver so that --cache-from works with a registry backend
143-         docker buildx create --use --driver docker-container
144+         #  Use a custom image to avoid DockerHub rate limits
145+         docker buildx create --use --driver docker-container \
146+           --driver-opt image=${GHCR_BUILDKIT_IMAGE} 
144147
145148        #  Build the image using registry caching backend
146149        retry docker \
@@ -156,7 +159,9 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
156159            --password-stdin
157160
158161        #  Enable a new Docker driver so that --cache-from/to works with a registry backend
159-         docker buildx create --use --driver docker-container
162+         #  Use a custom image to avoid DockerHub rate limits
163+         docker buildx create --use --driver docker-container \
164+           --driver-opt image=${GHCR_BUILDKIT_IMAGE} 
160165
161166        #  Build the image using registry caching backend
162167        retry docker \
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments