ci: switch to plain docker build avoiding docker-container driver
CI/CD / build-and-push (push) Failing after 33s

The docker-container buildkitd driver creates an isolated process that
cannot use DinD's registry-mirror config, and the cluster's registry-cache
returns 500 on BuildKit's ?ns=docker.io mirror protocol.

Plain docker build routes through the DinD daemon directly, which already
has registry-mirrors configured for docker.io pull-through cache.
Uses BUILDKIT_INLINE_CACHE=1 for layer caching between builds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chemavx
2026-04-22 17:38:42 +00:00
parent 359ce8928a
commit f411d84e91
+32 -46
View File
@@ -24,58 +24,44 @@ jobs:
run: echo "TAG=${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: git.chemavx.xyz
username: chemavx
password: ${{ secrets.CI_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
driver-opts: network=host
buildkitd-config-inline: |
[registry."git.chemavx.xyz"]
http = true
insecure = true
[registry."docker.io"]
mirrors = ["registry-cache.registry-cache.svc.cluster.local:5000"]
[registry."registry-cache.registry-cache.svc.cluster.local:5000"]
http = true
insecure = true
run: echo "${{ secrets.CI_TOKEN }}" | docker login git.chemavx.xyz -u chemavx --password-stdin
- name: Build and push bot image
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: true
tags: git.chemavx.xyz/chemavx/polymarket-bot:${{ steps.tag.outputs.TAG }}
cache-from: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot:buildcache
cache-to: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot:buildcache,mode=max
run: |
TAG=${{ steps.tag.outputs.TAG }}
docker build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from git.chemavx.xyz/chemavx/polymarket-bot:buildcache \
-t git.chemavx.xyz/chemavx/polymarket-bot:${TAG} \
-t git.chemavx.xyz/chemavx/polymarket-bot:buildcache \
-f Dockerfile .
docker push git.chemavx.xyz/chemavx/polymarket-bot:${TAG}
docker push git.chemavx.xyz/chemavx/polymarket-bot:buildcache
- name: Build and push API image
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.api
push: true
tags: git.chemavx.xyz/chemavx/polymarket-bot-api:${{ steps.tag.outputs.TAG }}
cache-from: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot-api:buildcache
cache-to: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot-api:buildcache,mode=max
run: |
TAG=${{ steps.tag.outputs.TAG }}
docker build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from git.chemavx.xyz/chemavx/polymarket-bot-api:buildcache \
-t git.chemavx.xyz/chemavx/polymarket-bot-api:${TAG} \
-t git.chemavx.xyz/chemavx/polymarket-bot-api:buildcache \
-f Dockerfile.api .
docker push git.chemavx.xyz/chemavx/polymarket-bot-api:${TAG}
docker push git.chemavx.xyz/chemavx/polymarket-bot-api:buildcache
- name: Build and push dashboard image
uses: docker/build-push-action@v3
with:
context: dashboard
file: dashboard/Dockerfile
push: true
tags: git.chemavx.xyz/chemavx/polymarket-bot-dashboard:${{ steps.tag.outputs.TAG }}
cache-from: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot-dashboard:buildcache
cache-to: type=registry,ref=git.chemavx.xyz/chemavx/polymarket-bot-dashboard:buildcache,mode=max
run: |
TAG=${{ steps.tag.outputs.TAG }}
docker build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from git.chemavx.xyz/chemavx/polymarket-bot-dashboard:buildcache \
-t git.chemavx.xyz/chemavx/polymarket-bot-dashboard:${TAG} \
-t git.chemavx.xyz/chemavx/polymarket-bot-dashboard:buildcache \
-f dashboard/Dockerfile \
dashboard
docker push git.chemavx.xyz/chemavx/polymarket-bot-dashboard:${TAG}
docker push git.chemavx.xyz/chemavx/polymarket-bot-dashboard:buildcache
- name: Update k8s manifests
run: |