mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-06-06 05:51:19 +08:00
fix(docker): Fix go-sqlite3 compilation on Alpine Linux
Add CGO_CFLAGS="-D_LARGEFILE64_SOURCE" to resolve musl libc compatibility issues. This enables the Large File Support feature macros which map pread64/pwrite64/off64_t symbols (used by SQLite) to musl's native pread/pwrite/off_t implementations. This fix eliminates the "undeclared identifier" errors during CGO compilation without requiring additional sqlite-dev dependencies. Co-Authored-By: tinkle-community <tinklefund@gmail.com>
This commit is contained in:
@@ -47,7 +47,9 @@ COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -trimpath -ldflags="-s -w" -o nofx .
|
||||
RUN CGO_ENABLED=1 GOOS=linux \
|
||||
·
|
||||
go build -trimpath -ldflags="-s -w" -o nofx .
|
||||
|
||||
# ──────────────────────────────────────────────────────────────
|
||||
# Runtime Stage (Minimal Executable Environment)
|
||||
|
||||
Reference in New Issue
Block a user