mirror of
https://github.com/henrygd/beszel.git
synced 2026-03-21 21:26:16 +01:00
agent: add separate glibc build with NVML support (#1618)
purego requires dynamic linking, so split the agent builds: - Default: static binary without NVML (works on musl/alpine) - Glibc: dynamic binary with NVML support via purego Changes: - Add glibc build tag to conditionally include NVML code - Add beszel-agent-linux-amd64-glibc build/archive in goreleaser - Update ghupdate to use glibc binary on glibc systems - Switch nvidia dockerfile to golang:bookworm with -tags glibc
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM --platform=$BUILDPLATFORM golang:alpine AS builder
|
||||
FROM --platform=$BUILDPLATFORM golang:bookworm AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -10,7 +10,7 @@ COPY . ./
|
||||
|
||||
# Build
|
||||
ARG TARGETOS TARGETARCH
|
||||
RUN CGO_ENABLED=0 GOGC=75 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-w -s" -o /agent ./internal/cmd/agent
|
||||
RUN CGO_ENABLED=0 GOGC=75 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -tags glibc -ldflags "-w -s" -o /agent ./internal/cmd/agent
|
||||
|
||||
# --------------------------
|
||||
# Smartmontools builder stage
|
||||
|
||||
Reference in New Issue
Block a user