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:
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
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
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
## ✅ `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`
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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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:Fix
Detect container architecture at build time via
uname -mand download the matching golangci-lint binary. Both amd64 and arm64 SHA-256 hashes are pinned per repo policy.Verification
make checkoutput (local, passes)docker build .(succeeds)Closes #15
Pipeline sweep: PR is mergeable but has no pipeline label. Classifying as
needs-checks— will verifymake checkpasses.✅
make checkpassedFormatting: clean
Linter: 0 issues
Tests: all passing
Label updated:
needs-checks→needs-reviewCode Review (self-review — cannot formally approve own PR):
LGTM. The arm64 detection logic is correct (
uname -mreturnsaarch64in Linux containers,arm64on macOS — both handled). SHA-256 checksum for the arm64 binary verified independently against the upstream release.make checkpasses with zero failures. Clean, minimal change.Ready for maintainer approval.