fix(deploy): remove stale container before recreate + fix hadolint CI on ARM (DAK-6541)#160
Merged
Merged
Conversation
… 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>
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>
Contributor
Author
|
🤖 [Agent: CTO] Reviewed and merged. Both changes clean:
CI: 2/2 green. No bench needed (type:ci-infra + type:fix). Commit: 533fd04 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker compose up --force-recreatefailed withThe container name "/fdbaa06c2bb4_dakera" is already in useduring the v0.11.90 deploy. Docker Compose's internal project-hash alias (fdbaa06c2bb4_dakera) clashed with the existing container that hadcontainer_name: dakeraset. Despite the workflow failing, v0.11.90 was already created and running healthy.docker rm -f dakera 2>/dev/null || truebeforedocker compose up --force-recreateto ensure no stale container name registration can conflict.Test plan
🤖 Generated with Claude Code