mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 02:36:17 +01:00
add dockerfile for henrygd/beszel-agent-intel
This commit is contained in:
25
internal/dockerfile_agent_intel
Normal file
25
internal/dockerfile_agent_intel
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM --platform=$BUILDPLATFORM golang:alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ../go.mod ../go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
# Copy source files
|
||||
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
|
||||
|
||||
# --------------------------
|
||||
# Final image: default scratch-based agent
|
||||
# Note: must cap_add: [CAP_PERFMON] in docker-compose.yml
|
||||
# --------------------------
|
||||
FROM alpine:edge
|
||||
|
||||
COPY --from=builder /agent /agent
|
||||
|
||||
RUN apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/edge/testing igt-gpu-tools
|
||||
|
||||
ENTRYPOINT ["/agent"]
|
||||
Reference in New Issue
Block a user