Enable CGO for all GoHoarder binaries to support SQLite

Changes:
- Set CGO_ENABLED=1 for gohoarder main binary in .goreleaser.yaml
- Add sqlite-libs and musl to Dockerfile.server
- Add sqlite-libs and musl to Dockerfile.scanner

All Go binaries that interact with SQLite now have CGO enabled:
 gohoarder (main binary) - used by server and scanner
 migrate (migration tool)

Runtime containers include necessary C libraries:
 Dockerfile.server - SQLite runtime support
 Dockerfile.scanner - SQLite runtime support
 Dockerfile.migrate - SQLite runtime support

This fixes: 'Binary was compiled with CGO_ENABLED=0, go-sqlite3 requires cgo'
This commit is contained in:
2026-01-03 21:41:59 +00:00
parent c1103630f0
commit f936dfa359
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ builds:
main: ./cmd/gohoarder
binary: gohoarder
env:
- CGO_ENABLED=0
- CGO_ENABLED=1
goos:
- linux
- darwin