Enable CGO for migrate binary to support SQLite

Changes:
- Set CGO_ENABLED=1 for migrate build in .goreleaser.yaml
- Add sqlite-libs and musl runtime dependencies to Dockerfile.migrate

This fixes the migration error: 'Binary was compiled with CGO_ENABLED=0,
go-sqlite3 requires cgo to work'
This commit is contained in:
2026-01-03 21:38:34 +00:00
parent 64f6f5cda4
commit c1103630f0
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ builds:
main: ./cmd/migrate
binary: migrate
env:
- CGO_ENABLED=0
- CGO_ENABLED=1
goos:
- linux
- darwin
+3 -1
View File
@@ -4,12 +4,14 @@ ARG TARGETARCH
FROM alpine:latest
# Install runtime dependencies
# Install runtime dependencies (including CGO/SQLite dependencies)
RUN apk add --no-cache \
ca-certificates \
postgresql-client \
mysql-client \
busybox-extras \
sqlite-libs \
musl \
&& update-ca-certificates
# Create non-root user