File tree 1 file changed +7
-2
lines changed
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
123
123
build_args+=(" --build-arg" " SCRIPT_ARG=${DOCKER_SCRIPT} " )
124
124
fi
125
125
126
+ GHCR_BUILDKIT_IMAGE=" ghcr.io/rust-lang/buildkit:buildx-stable-1"
126
127
# On non-CI jobs, we try to download a pre-built image from the rust-lang-ci
127
128
# ghcr.io registry. If it is not possible, we fall back to building the image
128
129
# locally.
@@ -140,7 +141,9 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
140
141
elif [[ " $PR_CI_JOB " == " 1" ]];
141
142
then
142
143
# 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}
144
147
145
148
# Build the image using registry caching backend
146
149
retry docker \
@@ -156,7 +159,9 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
156
159
--password-stdin
157
160
158
161
# 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}
160
165
161
166
# Build the image using registry caching backend
162
167
retry docker \
You can’t perform that action at this time.
0 commit comments