Use build-arg for Dockerfile registry to avoid DERP relay failures in Kaniko #73
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone — discovered during deploy monitoring session. Pipeline 154, 157, 158 all failed on the same DERP relay stream error before 161 succeeded.
Repo
ldraney/landscaping-assistantUser Story
As a developer merging to main
I want Kaniko to pull base images from the internal Harbor registry
So that builds don't randomly fail due to Tailscale DERP relay stream errors
Context
The Dockerfile's FROM statements reference
harbor.tail5b443a.ts.net(external URL). When Kaniko builds inside the cluster, it pulls these base images through the Tailscale DERP relay instead of the internal Harbor service. The DERP relay intermittently drops large transfers withstream error: INTERNAL_ERROR; received from peer, causing build-and-push failures that require manual pipeline restarts.This caused 3 consecutive pipeline failures during a deploy on 2026-06-03, delaying a production hotfix by ~30 minutes.
The fix: parameterize the registry in the Dockerfile with a build arg that defaults to the external URL (preserving local
docker buildcompatibility) and override it to the internal URL in.woodpecker.yamlvia Kaniko's--build-arg.File Targets
Files to modify:
Dockerfile— addARG REGISTRY=harbor.tail5b443a.ts.netand use${REGISTRY}in FROM statements.woodpecker.yaml— addbuild_args: "REGISTRY=harbor.harbor.svc.cluster.local"to the Kaniko step settingsFiles NOT to touch:
docker-compose.yml— dev uses the pre-built image directly, doesn't build the DockerfileAcceptance Criteria
${REGISTRY}/library/ruby-rails-build:latestand${REGISTRY}/library/ruby-rails-runtime:latestARG REGISTRY=harbor.tail5b443a.ts.netpreserves local docker build compatibilitydocker build .still works without passing --build-argTest Expectations
harbor.harbor.svc.cluster.local, notharbor.tail5b443a.ts.netConstraints
docker buildworking without extra flagsbuild_argssetting (verify in plugin docs)insecure: truein Kaniko config (already set)Checklist
Related
landscaping-assistant— projectldraney/base-images— source of the base images being pulledldraney/landscaping-assistant #69— CI optimization (related infra work)