ci: migrate from plugins/docker to woodpeckerci/plugin-docker-buildx

Replace the old Docker-in-Docker build approach (plugins/docker) with
the modern buildx plugin that natively supports BuildKit. This fixes:
- "Cannot connect to the Docker daemon" errors (no DinD needed)
- "the --mount option requires BuildKit" errors (buildx = BuildKit)
- OOM in publish step (skopeo no longer needed, buildx pushes directly)

Also removes the intermediate build-tag/skopeo-copy/publish dance —
buildx pushes both versioned and latest tags in a single step.
This commit is contained in:
Viktor Barzin 2026-03-15 22:52:01 +00:00
parent 55aff55025
commit 546f6957e3
No known key found for this signature in database
GPG key ID: 0EB088298288D958
2 changed files with 24 additions and 48 deletions

View file

@ -42,10 +42,11 @@ steps:
- apt-get update && apt-get install -y --no-install-recommends libglib2.0-0
- .venv/bin/pytest tests/integration/ tests/regression/ tests/e2e/ tests/test_listing_geojson.py -v --tb=short
- name: build-api-image
image: plugins/docker
environment:
DOCKER_BUILDKIT: 1
- name: build-and-push-api
image: woodpeckerci/plugin-docker-buildx
depends_on:
- test-unit
- test-integration
settings:
username: viktorbarzin
password:
@ -54,31 +55,16 @@ steps:
dockerfile: Dockerfile
context: .
target: production
cache_from:
- viktorbarzin/realestatecrawler:latest
- viktorbarzin/realestatecrawler:builder
tags:
- "build-${CI_PIPELINE_NUMBER}"
- name: publish-api-image
image: alpine
depends_on:
- test-unit
- test-integration
- build-api-image
environment:
DOCKERHUB_TOKEN:
from_secret: dockerhub-token
commands:
- apk add --no-cache skopeo
- 'skopeo copy --src-creds "viktorbarzin:$DOCKERHUB_TOKEN" --dest-creds "viktorbarzin:$DOCKERHUB_TOKEN" "docker://docker.io/viktorbarzin/realestatecrawler:build-${CI_PIPELINE_NUMBER}" "docker://docker.io/viktorbarzin/realestatecrawler:${CI_PIPELINE_NUMBER}"'
- 'skopeo copy --src-creds "viktorbarzin:$DOCKERHUB_TOKEN" --dest-creds "viktorbarzin:$DOCKERHUB_TOKEN" "docker://docker.io/viktorbarzin/realestatecrawler:build-${CI_PIPELINE_NUMBER}" "docker://docker.io/viktorbarzin/realestatecrawler:latest"'
- 'skopeo copy --src-creds "viktorbarzin:$DOCKERHUB_TOKEN" --dest-creds "viktorbarzin:$DOCKERHUB_TOKEN" "docker://docker.io/viktorbarzin/realestatecrawler:build-${CI_PIPELINE_NUMBER}" "docker://docker.io/viktorbarzin/realestatecrawler:builder"'
platforms:
- linux/amd64
tag: ["${CI_PIPELINE_NUMBER}", "latest"]
cache_from: "viktorbarzin/realestatecrawler:latest"
cache_to: "type=inline"
- name: update-deployment
image: alpine
depends_on:
- publish-api-image
- build-and-push-api
commands:
- apk add --no-cache curl jq
- |

View file

@ -53,8 +53,13 @@ steps:
commands:
- cd frontend && npx vitest run --reporter=verbose --shard=4/4
- name: build-frontend-image
image: plugins/docker
- name: build-and-push-frontend
image: woodpeckerci/plugin-docker-buildx
depends_on:
- test-shard-1
- test-shard-2
- test-shard-3
- test-shard-4
settings:
username: viktorbarzin
password:
@ -63,31 +68,16 @@ steps:
dockerfile: frontend/Dockerfile
context: frontend
target: production
cache_from:
- viktorbarzin/immoweb:latest
tags:
- "build-${CI_PIPELINE_NUMBER}"
- name: publish-frontend-image
image: alpine
depends_on:
- test-shard-1
- test-shard-2
- test-shard-3
- test-shard-4
- build-frontend-image
environment:
DOCKERHUB_TOKEN:
from_secret: dockerhub-token
commands:
- apk add --no-cache skopeo
- 'skopeo copy --src-creds "viktorbarzin:$DOCKERHUB_TOKEN" --dest-creds "viktorbarzin:$DOCKERHUB_TOKEN" "docker://docker.io/viktorbarzin/immoweb:build-${CI_PIPELINE_NUMBER}" "docker://docker.io/viktorbarzin/immoweb:${CI_PIPELINE_NUMBER}"'
- 'skopeo copy --src-creds "viktorbarzin:$DOCKERHUB_TOKEN" --dest-creds "viktorbarzin:$DOCKERHUB_TOKEN" "docker://docker.io/viktorbarzin/immoweb:build-${CI_PIPELINE_NUMBER}" "docker://docker.io/viktorbarzin/immoweb:latest"'
platforms:
- linux/amd64
tag: ["${CI_PIPELINE_NUMBER}", "latest"]
cache_from: "viktorbarzin/immoweb:latest"
cache_to: "type=inline"
- name: update-deployment
image: alpine
depends_on:
- publish-frontend-image
- build-and-push-frontend
commands:
- apk add --no-cache curl jq
- |