Skip to content

Commit b3e7492

Browse files
committed
fix: use TOML config with buildx to avoid DockerHub rate limits
1 parent c6e3fd7 commit b3e7492

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@ check-reqs:
4040

4141
## This function is specific to Jenkins infrastructure and isn't required in other contexts
4242
docker-init: check-reqs
43-
@set -x; docker buildx create --use
43+
ifeq ($(CI),true)
44+
ifeq ($(wildcard /etc/buildkitd.toml),)
45+
echo 'WARNING: /etc/buildkitd.toml not found, using default configuration.'
46+
docker buildx create --use --bootstrap --driver docker-container
47+
else
48+
docker buildx create --use --bootstrap --driver docker-container --config /etc/buildkitd.toml
49+
endif
50+
else
51+
docker buildx create --use --bootstrap --driver docker-container
52+
endif
4453
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
4554

4655
build: check-reqs

0 commit comments

Comments
 (0)