fix: pass CAMOUFOX_ARCH to Docker build instead of ARCH - #8279
Merged
Conversation
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.
Problem
On ARM64 hosts (uname -m = aarch64), docker build fails at the Camoufox download step with "End-of-central-directory signature not found."
The Makefile correctly maps ARCH=aarch64 → CAMOUFOX_ARCH=arm64 for the fetch target (line 14), but the build target (line 33) passes the raw ARCH value to Docker via --build-arg ARCH=$(ARCH).
The Dockerfile then uses ${ARCH} directly in the download URL (line 48): camoufox-${CAMOUFOX_VERSION}-${CAMOUFOX_RELEASE}-lin.${ARCH}.zip
GitHub releases use arm64 in filenames (e.g. camoufox-135.0.1-beta.24-lin.arm64.zip), not aarch64. So the download 404s, curl saves the GitHub 404 HTML page as the zip file, and unzip fails.
Fix
Pass
CAMOUFOX_ARCH(already correctly mapped) instead ofARCH:build: fetch docker build --no-cache \ - --build-arg ARCH=$(ARCH) \ + --build-arg ARCH=$(CAMOUFOX_ARCH) \ --build-arg CAMOUFOX_VERSION=$(VERSION) \ --build-arg CAMOUFOX_RELEASE=$(RELEASE) \ -t $(IMAGE) .This ensures the Dockerfile receives arm64 (not aarch64) on ARM hosts, matching the actual GitHub release filenames.
Verification