Skip to content

fix(deploy): remove stale container before recreate + fix hadolint CI on ARM (DAK-6541)#160

Merged
ferhimedamine merged 3 commits into
mainfrom
fix/dak6541-container-name-conflict
Jun 12, 2026
Merged

fix(deploy): remove stale container before recreate + fix hadolint CI on ARM (DAK-6541)#160
ferhimedamine merged 3 commits into
mainfrom
fix/dak6541-container-name-conflict

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

Summary

  • Root cause (DAK-6541): docker compose up --force-recreate failed with The container name "/fdbaa06c2bb4_dakera" is already in use during the v0.11.90 deploy. Docker Compose's internal project-hash alias (fdbaa06c2bb4_dakera) clashed with the existing container that had container_name: dakera set. Despite the workflow failing, v0.11.90 was already created and running healthy.
  • Fix: Add docker rm -f dakera 2>/dev/null || true before docker compose up --force-recreate to ensure no stale container name registration can conflict.
  • Production impact: None — v0.11.90 is already healthy on production. This PR prevents recurrence on future deploys.

Test plan

  • Verify CI passes (workflow syntax check)
  • Next production deploy should proceed without container naming conflict

🤖 Generated with Claude Code

… conflict

When docker compose --force-recreate runs on a container with an explicit
container_name, Docker can fail with "name already in use" if the compose
project-hash internal alias conflicts with the existing container registration.

Fix: explicitly docker rm -f the dakera container before compose up so there
is no stale name entry to collide with.

Root cause of DAK-6541: v0.11.90 deploy failed with
"/fdbaa06c2bb4_dakera is already in use" — production was on v0.11.89,
container was already created by compose during the failed run, leaving a
stale registration. v0.11.90 was already healthy post-failure; this PR
prevents recurrence.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ferhimedamine and others added 2 commits June 12, 2026 10:17
hadolint/hadolint-action@v3.3.0 pulls ghcr.io/hadolint/hadolint:v2.14.0-debian
at build time. Self-hosted ARM runners lack ambient GHCR auth — the action
fails with 403 Forbidden even though the workflow has packages:read permission.

Fix: explicit docker/login-action@v3 step before hadolint using GITHUB_TOKEN.
This is a permanent infra fix, not a flake workaround.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
hadolint/hadolint-action@v3.3.0 needs to pull ghcr.io/hadolint/hadolint via
BuildKit. Self-hosted ARM runners lack the ambient GHCR credentials that
BuildKit requires — explicit docker/login-action does not help because BuildKit
uses its own credential store separate from the Docker CLI daemon.

GitHub-hosted (ubuntu-latest) runners have the ambient token that BuildKit can
use for ghcr.io pulls. The validate job (docker-compose config + hadolint lint)
is static analysis — it does not need ARM64 architecture.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@ferhimedamine ferhimedamine changed the title fix(deploy): remove stale container before recreate to prevent naming conflict fix(deploy): remove stale container before recreate + fix hadolint CI on ARM (DAK-6541) Jun 12, 2026
@ferhimedamine ferhimedamine merged commit 533fd04 into main Jun 12, 2026
2 checks passed
@ferhimedamine ferhimedamine added the agent/cto Reviewed/merged by CTO agent label Jun 12, 2026
@ferhimedamine

Copy link
Copy Markdown
Contributor Author

🤖 [Agent: CTO] Reviewed and merged. Both changes clean:

  1. Container naming conflict fix — docker rm -f dakera before --force-recreate prevents stale alias collision
  2. Hadolint CI moved to ubuntu-latest for ambient GHCR auth (self-hosted ARM lacks it)

CI: 2/2 green. No bench needed (type:ci-infra + type:fix). Commit: 533fd04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/cto Reviewed/merged by CTO agent auto-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant