fix: Docker build failures on arm64 (closes #15) #16

Merged
sneak merged 1 commits from fix/docker-multiarch-lint into main 2026-02-25 20:51:45 +01:00
Collaborator

Problem

The Dockerfile hardcodes golangci-lint-2.10.1-linux-amd64.tar.gz, causing Docker builds to fail on arm64 hosts. The amd64 binary cannot execute on aarch64, producing:

/usr/local/bin/golangci-lint: line 12: syntax error: unexpected ")"
make: *** [Makefile:33: lint] Error 2

Fix

Detect container architecture at build time via uname -m and download the matching golangci-lint binary. Both amd64 and arm64 SHA-256 hashes are pinned per repo policy.

Verification

make check output (local, passes)

Checking formatting...
Running linter...
golangci-lint run
Running tests...
PASS - all tests pass

docker build . (succeeds)

Successfully built 5ebf44a97901

Closes #15

## Problem The Dockerfile hardcodes `golangci-lint-2.10.1-linux-amd64.tar.gz`, causing Docker builds to fail on arm64 hosts. The amd64 binary cannot execute on aarch64, producing: ``` /usr/local/bin/golangci-lint: line 12: syntax error: unexpected ")" make: *** [Makefile:33: lint] Error 2 ``` ## Fix Detect container architecture at build time via `uname -m` and download the matching golangci-lint binary. Both amd64 and arm64 SHA-256 hashes are pinned per repo policy. ## Verification ### `make check` output (local, passes) ``` Checking formatting... Running linter... golangci-lint run Running tests... PASS - all tests pass ``` ### `docker build .` (succeeds) ``` Successfully built 5ebf44a97901 ``` Closes #15
sneak was assigned by clawbot 2026-02-25 15:12:57 +01:00
clawbot added 1 commit 2026-02-25 15:12:57 +01:00
fix: detect architecture for golangci-lint download in Docker build
All checks were successful
check / check (push) Successful in 1m34s
5ca64a37ce
The golangci-lint binary was hardcoded as linux-amd64, causing Docker builds
to fail on arm64 hosts. The amd64 ELF binary cannot execute on aarch64,
producing a misleading shell syntax error during make check.

Use uname -m to detect the container architecture at build time and download
the matching binary. Both amd64 and arm64 SHA-256 hashes are pinned.

Closes #15
Author
Collaborator

Pipeline sweep: PR is mergeable but has no pipeline label. Classifying as needs-checks — will verify make check passes.

Pipeline sweep: PR is mergeable but has no pipeline label. Classifying as `needs-checks` — will verify `make check` passes.
sneak was unassigned by clawbot 2026-02-25 16:43:21 +01:00
clawbot self-assigned this 2026-02-25 16:43:21 +01:00
Author
Collaborator

make check passed

Formatting: clean
Linter: 0 issues
Tests: all passing

Checking formatting...
Running linter...
golangci-lint run
0 issues.
Running tests...
CGO_ENABLED=1 go test -timeout 30s -v ./...
ok  sneak.berlin/go/pixa/internal/config       (cached)
ok  sneak.berlin/go/pixa/internal/encurl       (cached)
ok  sneak.berlin/go/pixa/internal/handlers     (cached)
ok  sneak.berlin/go/pixa/internal/imgcache     (cached)
ok  sneak.berlin/go/pixa/internal/middleware    (cached)
ok  sneak.berlin/go/pixa/internal/seal         (cached)
ok  sneak.berlin/go/pixa/internal/session      (cached)

Label updated: needs-checksneeds-review

## ✅ `make check` passed Formatting: clean Linter: 0 issues Tests: all passing ``` Checking formatting... Running linter... golangci-lint run 0 issues. Running tests... CGO_ENABLED=1 go test -timeout 30s -v ./... ok sneak.berlin/go/pixa/internal/config (cached) ok sneak.berlin/go/pixa/internal/encurl (cached) ok sneak.berlin/go/pixa/internal/handlers (cached) ok sneak.berlin/go/pixa/internal/imgcache (cached) ok sneak.berlin/go/pixa/internal/middleware (cached) ok sneak.berlin/go/pixa/internal/seal (cached) ok sneak.berlin/go/pixa/internal/session (cached) ``` Label updated: `needs-checks` → `needs-review`
Author
Collaborator

Code Review (self-review — cannot formally approve own PR):

LGTM. The arm64 detection logic is correct (uname -m returns aarch64 in Linux containers, arm64 on macOS — both handled). SHA-256 checksum for the arm64 binary verified independently against the upstream release. make check passes with zero failures. Clean, minimal change.

Ready for maintainer approval.

**Code Review (self-review — cannot formally approve own PR):** LGTM. The arm64 detection logic is correct (`uname -m` returns `aarch64` in Linux containers, `arm64` on macOS — both handled). SHA-256 checksum for the arm64 binary verified independently against the upstream release. `make check` passes with zero failures. Clean, minimal change. Ready for maintainer approval.
clawbot added the
merge-ready
label 2026-02-25 20:44:22 +01:00
clawbot removed their assignment 2026-02-25 20:44:23 +01:00
sneak was assigned by clawbot 2026-02-25 20:44:23 +01:00
sneak merged commit 811c210b09 into main 2026-02-25 20:51:45 +01:00
sneak deleted branch fix/docker-multiarch-lint 2026-02-25 20:51:45 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/pixa#16
No description provided.