mirror of
https://github.com/Dvorinka/beszel.git
synced 2026-06-03 21:02:56 +00:00
8011d487f1
- Add status pages, incidents, badges, maintenance, bulk ops, and metrics - Add Docker packaging, env example, and frontend routes - Refresh GitHub workflows and project metadata
32 lines
794 B
Plaintext
32 lines
794 B
Plaintext
FROM --platform=$BUILDPLATFORM golang:1.26.2-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
|
|
|
|
RUN rm -rf /tmp/*
|
|
|
|
# --------------------------
|
|
# Final image: default scratch-based agent
|
|
# --------------------------
|
|
FROM alpine:3.23
|
|
COPY --from=builder /agent /agent
|
|
|
|
# AMD GPU name lookup (used by agent on Linux when /usr/share/libdrm/amdgpu.ids is read)
|
|
COPY --from=builder /app/agent/test-data/amdgpu.ids /usr/share/libdrm/amdgpu.ids
|
|
|
|
RUN apk add --no-cache smartmontools
|
|
|
|
# Ensure data persistence across container recreations
|
|
VOLUME ["/var/lib/beszel-agent"]
|
|
|
|
ENTRYPOINT ["/agent"]
|